diff options
Diffstat (limited to 'build/target.cxx')
-rw-r--r-- | build/target.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/build/target.cxx b/build/target.cxx index 15d57ca..347a382 100644 --- a/build/target.cxx +++ b/build/target.cxx @@ -16,11 +16,6 @@ namespace build { // recipe // - const recipe empty_recipe; - const recipe noop_recipe (&noop_recipe_function); - const recipe default_recipe ( - static_cast<recipe_function*> (&execute_prerequisites)); - target_state noop_recipe_function (action, target&) { @@ -28,6 +23,18 @@ namespace build return target_state::unchanged; } + static target_state + default_recipe_function (action a, target& t) + { + return current_mode == execution_mode::first + ? execute_prerequisites (a, t) + : reverse_execute_prerequisites (a, t); + } + + const recipe empty_recipe; + const recipe noop_recipe (&noop_recipe_function); + const recipe default_recipe (&default_recipe_function); + // target // ostream& |