From 1d6e68fda762535fa8508f94ca254a79f293edb2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 24 Jul 2015 16:39:55 +0200 Subject: Add support for generated test input/output --- build/algorithm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'build/algorithm') diff --git a/build/algorithm b/build/algorithm index d01614c..3b09d9c 100644 --- a/build/algorithm +++ b/build/algorithm @@ -6,6 +6,7 @@ #define BUILD_ALGORITHM #include +#include // pair #include #include @@ -68,6 +69,14 @@ namespace build void match (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 + // dependents count. See also execute_delegate(). + // + std::pair + match_delegate (action, target&); + // The standard prerequisite search and match implementations. They call // search_and_match_*() versions below passing non-empty directory for // the clean operation. @@ -116,6 +125,15 @@ namespace build target_state execute (action, target&); + // Execute the recipe obtained with match_delegate(). Note that + // the target's state is neither checked nor updated by this + // function. In other words, the appropriate usage is to call + // this function from another recipe and to factor the obtained + // state into the one returned. + // + target_state + execute_delegate (const recipe&, action, target&); + // A special version of the above that should be used for "direct" // and "now" execution, that is, side-stepping the normal target- // prerequisite relationship (so no dependents count is decremented) -- cgit v1.1