From fd689eb883655dcb29e505b041cd02fac01f0bac Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 27 Aug 2015 15:11:40 +0200 Subject: Dist module/meta-operation initial implementation --- build/config/operation.cxx | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'build/config/operation.cxx') diff --git a/build/config/operation.cxx b/build/config/operation.cxx index 913ae29..80b92dc 100644 --- a/build/config/operation.cxx +++ b/build/config/operation.cxx @@ -187,17 +187,26 @@ namespace build } static void - configure_execute (action a, const action_targets& ts) + configure_search (scope& root, + const target_key&, + const location&, + action_targets& ts) { - for (void* v: ts) - { - target& t (*static_cast (v)); - scope* rs (t.base_scope ().root_scope ()); + tracer trace ("configure_search"); + level5 ([&]{trace << "collecting " << root.path ();}); + ts.push_back (&root); + } - if (rs == nullptr) - fail << "out of project target " << t; + static void + configure_match (action, action_targets&) {} - configure_project (a, *rs); + static void + configure_execute (action a, const action_targets& ts, bool) + { + for (void* v: ts) + { + scope& root (*static_cast (v)); + configure_project (a, root); } } @@ -209,8 +218,8 @@ namespace build nullptr, // meta-operation pre &configure_operation_pre, &load, // normal load - &search, // normal search - &match, // normal match + &configure_search, + &configure_match, &configure_execute, nullptr, // operation post nullptr // meta-operation post @@ -355,7 +364,7 @@ namespace build } static void - disfigure_execute (action a, const action_targets& ts) + disfigure_execute (action a, const action_targets& ts, bool quiet) { tracer trace ("disfigure_execute"); @@ -372,7 +381,8 @@ namespace build targets.insert ( dir::static_type, root.path (), "", nullptr, trace).first); - info << diag_done (a, t); + if (!quiet) + info << diag_done (a, t); } } } -- cgit v1.1