diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-24 12:29:20 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-24 12:29:20 +0200 |
commit | 2a0f9e035f673f1ee387924501a31990de37f18d (patch) | |
tree | b8e55ab74bc88b788e99d8649219b931b80432d5 /build/algorithm | |
parent | 4c44c914d898af53152addad5530504548175e85 (diff) |
Implement lib/liba/libso{} target group, shared/static library build
Diffstat (limited to 'build/algorithm')
-rw-r--r-- | build/algorithm | 29 |
1 files changed, 25 insertions, 4 deletions
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 <executor_function* E = execute> target_state execute_prerequisites (action, target&); // As above but iterates over the prerequisites in reverse. // + template <executor_function* E = execute> 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 <executor_function* E = execute> 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 <typename T> + template <typename T, executor_function* E = execute> 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 <executor_function* E = execute> + target_state + default_action (action, target&); // Standard perform(clean) action implementation for the file target // or derived. // + template <executor_function* E = execute> target_state - perform_clean_file (action, target&); + perform_clean (action, target&); } #include <build/algorithm.ixx> |