From 0db17bfec8b3b6c436f3c9c346d17d98458c3654 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 3 Aug 2015 13:10:28 +0200 Subject: match_only and dependents count rework, part 1 --- build/algorithm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'build/algorithm') diff --git a/build/algorithm b/build/algorithm index 1171f9d..99e6c2b 100644 --- a/build/algorithm +++ b/build/algorithm @@ -64,11 +64,23 @@ namespace build target& search (name, scope&); - // Match a rule to the action/target with ambiguity detection. + // Match and apply a rule to the action/target with ambiguity + // detection. Increment the target's dependents count, which + // means that you should call this function with the intent + // to also call execute(). In case of optimizations that + // would avoid calling execute(), decrement the dependents + // cound manually to compensate. // void match (action, target&); + // Match (but do not apply) a rule to the action/target with + // ambiguity detection. Note that this function does not touch + // the dependents count. + // + void + match_only (action, target&); + // Match a "delegate rule" from withing another rules' apply() // function. Return recipe and recipe action (if any). Note // that unlike match(), this call doesn't increment the @@ -120,7 +132,7 @@ namespace build // Execute the action on target, assuming a rule has been matched // and the recipe for this action has been set. This is the default - // executor implementation. + // executor implementation. Decrements the dependents count. // target_state execute (action, target&); -- cgit v1.1