From e815af118562c68794efbd310c887acd8eae800c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 24 Jun 2015 13:53:28 +0200 Subject: First take on the cli module plus necessary infrastructure --- build/algorithm.ixx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'build/algorithm.ixx') diff --git a/build/algorithm.ixx b/build/algorithm.ixx index 3907209..3a6f183 100644 --- a/build/algorithm.ixx +++ b/build/algorithm.ixx @@ -2,6 +2,8 @@ // copyright : Copyright (c) 2014-2015 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file +#include // pair + #include #include @@ -36,18 +38,28 @@ namespace build return static_cast (search (T::static_type, dir, name, ext, scope)); } - void - match_impl (action, target&); + std::pair + match_impl (action, target&, bool apply); inline void match (action a, target& t) { if (!t.recipe (a)) - match_impl (a, t); + match_impl (a, t, true); t.dependents++; } + group_view + resolve_group_members_impl (action, target_group&); + + inline group_view + resolve_group_members (action a, target_group& g) + { + group_view r (g.members (a)); + return r.members != nullptr ? r : resolve_group_members_impl (a, g); + } + target_state execute_impl (action, target&); -- cgit v1.1