From a3d5de5dfecc694d15f23ed03d13cb108dda3e1b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 26 Oct 2023 12:06:33 +0200 Subject: Add clean_during_match*() functions --- libbuild2/algorithm.hxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'libbuild2/algorithm.hxx') diff --git a/libbuild2/algorithm.hxx b/libbuild2/algorithm.hxx index 779578e..5ebbee2 100644 --- a/libbuild2/algorithm.hxx +++ b/libbuild2/algorithm.hxx @@ -649,7 +649,8 @@ namespace build2 // // Note that such a target must still be updated normally during the execute // phase in order to keep the dependency counts straight (at which point the - // target state/timestamp will be re-incorporated into the result). + // target state/timestamp will be re-incorporated into the result). Unless + // it was matched direct. // LIBBUILD2_SYMEXPORT bool update_during_match (tracer&, @@ -669,6 +670,20 @@ namespace build2 action, target&, uintptr_t mask = prerequisite_target::include_udm); + // Equivalent functions for clean. Note that if possible you should leave + // cleaning to normal execute and these functions should only be used in + // special cases where this is not possible. + // + LIBBUILD2_SYMEXPORT bool + clean_during_match (tracer&, + action, const target&); + + LIBBUILD2_SYMEXPORT bool + clean_during_match_prerequisites ( + tracer&, + action, target&, + uintptr_t mask = prerequisite_target::include_udm); + // The default prerequisite execute implementation. Call execute_async() on // each non-ignored (non-NULL) prerequisite target in a loop and then wait // for their completion. Return target_state::changed if any of them were -- cgit v1.1