From cf6b3e34b59ad120111e0c1ead779bbb3a70c38d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 12 Mar 2015 15:43:17 +0200 Subject: Implement clean operation --- build/algorithm | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'build/algorithm') diff --git a/build/algorithm b/build/algorithm index 8ce35f8..e4b319a 100644 --- a/build/algorithm +++ b/build/algorithm @@ -31,6 +31,12 @@ namespace build void search_and_match (action, target&); + // As above but ignores (does not match) prerequsites that are not + // in the same or a subdirectory of dir. + // + void + search_and_match (action, target&, const path& dir); + // Execute the action on target, assuming a rule has been matched // and the recipe for this action has been set. // @@ -38,8 +44,10 @@ namespace build execute (action, target&); // The default prerequisite execute implementation. It calls execute() - // for each prerequisite in a loop. Returns target_state::changed - // if any of them were changed and target_state::unchanged otherwise. + // on each non-ignored (NULL target) prerequisite in a loop. Returns + // target_state::changed if any of them were changed and + // target_state::unchanged otherwise. Note that this function can be + // used as a recipe. // target_state execute_prerequisites (action, target&); @@ -53,11 +61,17 @@ namespace build // Another version of the above that does two extra things for the // caller: it determines whether the action needs to be executed on // the target based on the passed timestamp and, if so, finds a - // prerequisite of the specified type (e.g., source file). + // prerequisite of the specified type (e.g., a source file). // template T* execute_prerequisites (action, target&, const timestamp&); + + // Standard perform(clean) action implementation for the file target + // or derived. + // + target_state + perform_clean_file (action, target&); } #include -- cgit v1.1