From cb8399da1f0b1c5f28e443c98bfc3cb4e12b8cbf Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 20 Jul 2015 17:35:47 +0200 Subject: Implement pre/post operation support Also, extend execution mode/postponed logic to propagate the postponed target state. At the top, we now re-try postponed targets. This results in the expected behavior when, for example, cleaning two targets with one depending on the other. --- build/config/operation.cxx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'build/config') diff --git a/build/config/operation.cxx b/build/config/operation.cxx index 48d4d19..a79ddbf 100644 --- a/build/config/operation.cxx +++ b/build/config/operation.cxx @@ -215,6 +215,7 @@ namespace build nullptr, // meta-operation pre &configure_operation_pre, &load, // normal load + &search, // normal search &match, // normal match &configure_execute, nullptr, // operation post @@ -244,17 +245,19 @@ namespace build } static void - disfigure_match (action, - scope& root, - const target_key&, - const location&, - action_targets& ts) + disfigure_search (scope& root, + const target_key&, + const location&, + action_targets& ts) { - tracer trace ("disfigure_match"); + tracer trace ("disfigure_search"); level5 ([&]{trace << "collecting " << root.path ();}); ts.push_back (&root); } + static void + disfigure_match (action, action_targets&) {} + static bool disfigure_project (action a, scope& root) { @@ -403,6 +406,7 @@ namespace build nullptr, // meta-operation pre &disfigure_operation_pre, &disfigure_load, + &disfigure_search, &disfigure_match, &disfigure_execute, nullptr, // operation post -- cgit v1.1