From 6082d76936b8a65380eb7af03b4167d8f0298158 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 21 Apr 2016 12:18:15 +0200 Subject: Implement short-circuiting to group state This is necessary to get rid of bogus restarts in inject_prerequisites() where it think a group member was updated since its state changed from unknown to (group's) changed. --- build2/target.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'build2/target.cxx') diff --git a/build2/target.cxx b/build2/target.cxx index 663d31d..4d4fe2a 100644 --- a/build2/target.cxx +++ b/build2/target.cxx @@ -66,12 +66,9 @@ namespace build2 action = a; recipe_ = move (r); - // Also reset the target state. If this is a noop recipe, then - // mark the target unchanged so that we don't waste time executing - // the recipe. + // If this is a noop recipe, then mark the target unchanged so that we + // don't waste time executing the recipe. // - raw_state = target_state::unknown; - if (recipe_function** f = recipe_.target ()) { if (*f == &noop_action) @@ -89,6 +86,7 @@ namespace build2 reset (action_type) { prerequisite_targets.clear (); + raw_state = target_state::unknown; } group_view target:: -- cgit v1.1