diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-08-05 16:39:38 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-08-05 16:39:38 +0200 |
commit | 6393d49cd57ff5d66c5535b3f6d6f8c22a7696f9 (patch) | |
tree | 6655f8771e049caadb2c977df30ecb5a3b2ff779 /build2/b.cxx | |
parent | e0a7c21e5ebb341c87546bf2706ff7dda88deb64 (diff) |
Add --match-only option
Diffstat (limited to 'build2/b.cxx')
-rw-r--r-- | build2/b.cxx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/build2/b.cxx b/build2/b.cxx index f2e45c3..1098da9 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -1186,8 +1186,11 @@ main (int argc, char* argv[]) // Run quiet. // - if (mif->match != nullptr) mif->match (mparams, a, tgs); - if (mif->execute != nullptr) mif->execute (mparams, a, tgs, true); + if (mif->match != nullptr) + mif->match (mparams, a, tgs); + + if (mif->execute != nullptr && !ops.match_only ()) + mif->execute (mparams, a, tgs, true); if (mif->operation_post != nullptr) mif->operation_post (mparams, pre_oid); @@ -1200,8 +1203,11 @@ main (int argc, char* argv[]) action a (mid, oid, 0); - if (mif->match != nullptr) mif->match (mparams, a, tgs); - if (mif->execute != nullptr) mif->execute (mparams, a, tgs, verb == 0); + if (mif->match != nullptr) + mif->match (mparams, a, tgs); + + if (mif->execute != nullptr && !ops.match_only ()) + mif->execute (mparams, a, tgs, verb == 0); if (post_oid != 0) { @@ -1217,8 +1223,11 @@ main (int argc, char* argv[]) // Run quiet. // - if (mif->match != nullptr) mif->match (mparams, a, tgs); - if (mif->execute != nullptr) mif->execute (mparams, a, tgs, true); + if (mif->match != nullptr) + mif->match (mparams, a, tgs); + + if (mif->execute != nullptr && !ops.match_only ()) + mif->execute (mparams, a, tgs, true); if (mif->operation_post != nullptr) mif->operation_post (mparams, post_oid); |