From 2a0f9e035f673f1ee387924501a31990de37f18d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 24 Apr 2015 12:29:20 +0200 Subject: Implement lib/liba/libso{} target group, shared/static library build --- build/algorithm | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'build/algorithm') diff --git a/build/algorithm b/build/algorithm index 81ad8d8..7d82285 100644 --- a/build/algorithm +++ b/build/algorithm @@ -54,8 +54,13 @@ namespace build void inject_parent_fsdir (action, target&); + // Executor function type. + // + using executor_function = target_state (action, target&); + // Execute the action on target, assuming a rule has been matched - // and the recipe for this action has been set. + // and the recipe for this action has been set. This is the default + // executor implementation. // target_state execute (action, target&); @@ -68,17 +73,20 @@ namespace build // with postponed execution the same as ignored. Note that this // function can be used as a recipe. // + template target_state execute_prerequisites (action, target&); // As above but iterates over the prerequisites in reverse. // + template target_state reverse_execute_prerequisites (action, target&); // A version of the above that also determines whether the action // needs to be executed on the target based on the passed timestamp. // + template bool execute_prerequisites (action, target&, const timestamp&); @@ -89,15 +97,28 @@ namespace build // there are multiple prerequisites of this type, then the last // one returned. // - template + template T* - execute_prerequisites (action, target&, const timestamp&); + execute_find_prerequisites (action, target&, const timestamp&); + + // Return noop_recipe instead of using this function directly. + // + target_state + noop_action (action, target&); + + // Default action implementation which forwards to the prerequsites. + // Use default_recipe for the standard executor. + // + template + target_state + default_action (action, target&); // Standard perform(clean) action implementation for the file target // or derived. // + template target_state - perform_clean_file (action, target&); + perform_clean (action, target&); } #include -- cgit v1.1