aboutsummaryrefslogtreecommitdiff
path: root/build2/cli
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-03-03 14:33:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-03-03 15:25:32 +0200
commit183329b89ddf810e2df5c250ae5b97d8ebcbba74 (patch)
treebf1e174ffe0929a9ec78ac642b351cbc5a23b78b /build2/cli
parentbcb5045dff9e87decbad3a785eb1fe42f4fc1410 (diff)
Fix cli distribution via group
Diffstat (limited to 'build2/cli')
-rw-r--r--build2/cli/init.cxx28
-rw-r--r--build2/cli/target.cxx7
2 files changed, 17 insertions, 18 deletions
diff --git a/build2/cli/init.cxx b/build2/cli/init.cxx
index 1cf248d..590d434 100644
--- a/build2/cli/init.cxx
+++ b/build2/cli/init.cxx
@@ -300,23 +300,23 @@ namespace build2
{
auto& r (bs.rules);
- r.insert<cli_cxx> (perform_update_id, "cli.compile", compile_);
- r.insert<cli_cxx> (perform_clean_id, "cli.compile", compile_);
-
- r.insert<cxx::hxx> (perform_update_id, "cli.compile", compile_);
- r.insert<cxx::hxx> (perform_clean_id, "cli.compile", compile_);
-
- r.insert<cxx::cxx> (perform_update_id, "cli.compile", compile_);
- r.insert<cxx::cxx> (perform_clean_id, "cli.compile", compile_);
+ auto reg = [&r] (meta_operation_id mid, operation_id oid)
+ {
+ r.insert<cli_cxx> (mid, oid, "cli.compile", compile_);
+ r.insert<cxx::hxx> (mid, oid, "cli.compile", compile_);
+ r.insert<cxx::cxx> (mid, oid, "cli.compile", compile_);
+ r.insert<cxx::ixx> (mid, oid, "cli.compile", compile_);
+ };
- r.insert<cxx::ixx> (perform_update_id, "cli.compile", compile_);
- r.insert<cxx::ixx> (perform_clean_id, "cli.compile", compile_);
+ reg (perform_id, update_id);
+ reg (perform_id, clean_id);
- // Other rules (e.g., cxx::compile) may need to have the group
- // members resolved. Looks like a general pattern: groups should
- // resolve on configure(update).
+ // Other rules (e.g., cxx::compile) may need to have the group members
+ // resolved/linked up. Looks like a general pattern: groups should
+ // resolve on *(update).
//
- r.insert<cli_cxx> (configure_update_id, "cli.compile", compile_);
+ reg (configure_id, update_id);
+ reg (dist_id, update_id);
}
return true;
diff --git a/build2/cli/target.cxx b/build2/cli/target.cxx
index 51f58aa..015c034 100644
--- a/build2/cli/target.cxx
+++ b/build2/cli/target.cxx
@@ -50,10 +50,9 @@ namespace build2
{
tracer trace ("cli::cli_cxx_factory");
- // Pre-enter (potential) members as targets. The main purpose
- // of doing this is to avoid searching for existing files in
- // src_base if the buildfile mentions some of them explicitly
- // as prerequisites.
+ // Pre-enter (potential) members as targets. The main purpose of doing
+ // this is to avoid searching for existing files in src_base if the
+ // buildfile mentions some of them explicitly as prerequisites.
//
targets.insert<cxx::hxx> (d, o, n, trace);
targets.insert<cxx::cxx> (d, o, n, trace);