diff options
Diffstat (limited to 'libbuild2/target.hxx')
-rw-r--r-- | libbuild2/target.hxx | 48 |
1 files changed, 2 insertions, 46 deletions
diff --git a/libbuild2/target.hxx b/libbuild2/target.hxx index 8adaa2c..eea43df 100644 --- a/libbuild2/target.hxx +++ b/libbuild2/target.hxx @@ -16,6 +16,7 @@ #include <libbuild2/scope.hxx> #include <libbuild2/action.hxx> +#include <libbuild2/recipe.hxx> #include <libbuild2/context.hxx> #include <libbuild2/variable.hxx> #include <libbuild2/target-key.hxx> @@ -52,51 +53,6 @@ namespace build2 value v_; }; - // Recipe. - // - // The returned target state is normally changed or unchanged. If there is - // an error, then the recipe should throw failed rather than returning (this - // is the only exception that a recipe can throw). - // - // The return value of the recipe is used to update the target state. If it - // is target_state::group then the target's state is the group's state. - // - // The recipe may also return postponed in which case the target state is - // assumed to be unchanged (normally this means a prerequisite was postponed - // and while the prerequisite will be re-examined via another dependency, - // this target is done). - // - // Note that max size for the "small capture optimization" in std::function - // ranges (in pointer sizes) from 0 (GCC prior to 5) to 2 (GCC 5) to 6 (VC - // 14.2). With the size ranging (in bytes for 64-bit target) from 32 (GCC) - // to 64 (VC). - // - using recipe_function = target_state (action, const target&); - using recipe = function<recipe_function>; - - // Commonly-used recipes. The default recipe executes the action on - // all the prerequisites in a loop, skipping ignored. Specifically, - // for actions with the "first" execution mode, it calls - // execute_prerequisites() while for those with the "last" mode -- - // reverse_execute_prerequisites(); see <libbuild2/operation.hxx>, - // <libbuild2/algorithm.hxx> for details. The group recipe call's the - // group's recipe. - // - LIBBUILD2_SYMEXPORT extern const recipe empty_recipe; - LIBBUILD2_SYMEXPORT extern const recipe noop_recipe; - LIBBUILD2_SYMEXPORT extern const recipe default_recipe; - LIBBUILD2_SYMEXPORT extern const recipe group_recipe; - - // Defined in <libbuild2/algorithm.hxx>. - // - LIBBUILD2_SYMEXPORT target_state - noop_action (action, const target&); - - // Defined in <libbuild2/algorithm.hxx>. - // - LIBBUILD2_SYMEXPORT target_state - group_action (action, const target&); - // A view of target group members. // struct group_view @@ -484,7 +440,7 @@ namespace build2 static const size_t offset_executed = 5; // Recipe has been executed. static const size_t offset_busy = 6; // Match/execute in progress. - // Inner/outer operation state. See <libbuild2/operation.hxx> for details. + // Inner/outer operation state. See <libbuild2/action.hxx> for details. // class LIBBUILD2_SYMEXPORT opstate { |