From 54e24990203f5e123396a44297ea4656ed3b6101 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 26 Apr 2015 09:53:41 +0200 Subject: Rework resolved prerequisite targets storage --- build/algorithm | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'build/algorithm') diff --git a/build/algorithm b/build/algorithm index 7d82285..161baa2 100644 --- a/build/algorithm +++ b/build/algorithm @@ -14,7 +14,7 @@ namespace build class prerequisite; class prerequisite_key; - // The default prerequsite search implementation. It first calls the + // The default prerequisite search implementation. It first calls the // target-type-specific search function. If that doesn't yeld anything, // it creates a new target. // @@ -41,23 +41,19 @@ namespace build void search_and_match (action, target&); - // As above but ignores (does not match) prerequsites that are not + // As above but ignores (does not match) prerequisites that are not // in the same or a subdirectory of dir. // void search_and_match (action, target&, const dir_path& dir); - // Inject dependency on the parent directory fsdir{}, unless it is - // the project's out_root (or is outside of any project; think, for - // example, install directories). + // Inject dependency on the parent directory's fsdir{}, unless it is + // the project's out_root (or is outside of any project; say, for + // example, an install directory). // 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. This is the default // executor implementation. @@ -66,27 +62,24 @@ namespace build execute (action, target&); // The default prerequisite execute implementation. It calls execute() - // on each non-ignored (non-NULL target) prerequisite in a loop. If this + // on each non-ignored (non-NULL) prerequisite target in a loop. If this // target is a member of a group, then it first does this to the group's // prerequisites. Returns target_state::changed if any of them were // changed and target_state::unchanged otherwise. It treats targets // 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&); @@ -95,9 +88,9 @@ namespace build // the target based on the passed timestamp and, if so, finds a // prerequisite of the specified type (e.g., a source file). If // there are multiple prerequisites of this type, then the last - // one returned. + // is returned. // - template + template T* execute_find_prerequisites (action, target&, const timestamp&); @@ -106,17 +99,15 @@ namespace build target_state noop_action (action, target&); - // Default action implementation which forwards to the prerequsites. - // Use default_recipe for the standard executor. + // Default action implementation which forwards to the prerequisites. + // Use default_recipe instead of using this function directly. // - template target_state default_action (action, target&); // Standard perform(clean) action implementation for the file target // or derived. // - template target_state perform_clean (action, target&); } -- cgit v1.1