aboutsummaryrefslogtreecommitdiff
path: root/build2/b.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-11-18 15:39:58 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-18 17:30:47 +0200
commitdd008d6e48b0bb66e1b9fdc489d9d1d9b4cb8d25 (patch)
tree1270a617c1a6893d3a1f5308ecf9d1e9dbc1694e /build2/b.cxx
parentaeeedd32f8717d8c6a1886a5561a879059be87d0 (diff)
Implement noop meta-operation
The effect is loading all the buildfiles but not searching/matching/executing any targets/operations. Useful for testing.
Diffstat (limited to 'build2/b.cxx')
-rw-r--r--build2/b.cxx17
1 files changed, 9 insertions, 8 deletions
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)
{