From 34e19551c1db1d8f0be3a41735506d6ce04b70e1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 21 Apr 2016 17:12:22 +0200 Subject: Move target state reset back to recipe() Doing it in target::reset() (which is called by match()) didn't play well with delegated recipes. --- build2/target | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'build2/target') diff --git a/build2/target b/build2/target index 76d7132..be0eff9 100644 --- a/build2/target +++ b/build2/target @@ -64,10 +64,9 @@ namespace build2 // error, then the recipe should throw rather than returning failed. // // The return value of the recipe is used to update the target state except - // if the state is target_state::group (either was was manually set by the - // recipe or already that value). Note that in this case the returned by the - // recipe value is still used as the resulting target state so it should - // match the group's state. + // if the state is set to target_state::group by the recipe. Note that in + // this case the returned by the recipe value is still used as the resulting + // target state so it should match the group's state. // using recipe_function = target_state (action, target&); using recipe = function; @@ -198,8 +197,7 @@ namespace build2 : dir (move (d)), out (move (o)), name (move (n)), ext (e) {} // Reset the target before matching it to a rule. The default - // implementation clears prerequisite_targets and sets the state to - // unknown. + // implementation clears prerequisite_targets. // virtual void reset (action_type); -- cgit v1.1