From dd008d6e48b0bb66e1b9fdc489d9d1d9b4cb8d25 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 18 Nov 2016 15:39:58 +0200 Subject: Implement noop meta-operation The effect is loading all the buildfiles but not searching/matching/executing any targets/operations. Useful for testing. --- build2/b.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'build2/b.cxx') diff --git a/build2/b.cxx b/build2/b.cxx index a652c97..4a764e6 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -927,15 +927,16 @@ main (int argc, char* argv[]) // building before we know how to for all the targets in this // operation batch. // - { - scope& bs (scopes.find (ts.out_base)); + scope& bs (scopes.find (ts.out_base)); - const string* e; - const target_type* ti (bs.find_target_type (tn, e)); + const string* e; + const target_type* ti (bs.find_target_type (tn, e)); - if (ti == nullptr) - fail (l) << "unknown target type " << tn.type; + if (ti == nullptr) + fail (l) << "unknown target type " << tn.type; + if (mif->search != nullptr) + { // If the directory is relative, assume it is relative to work // (must be consistent with how we derived out_base above). // @@ -986,8 +987,8 @@ main (int argc, char* argv[]) action a (mid, oid, 0); - mif->match (a, tgs); - mif->execute (a, tgs, verb == 0); + if (mif->match != nullptr) mif->match (a, tgs); + if (mif->execute != nullptr) mif->execute (a, tgs, verb == 0); if (post_oid != 0) { -- cgit v1.1