From 17b3a78696f0b1fd6f0f60d53ec568cf3b9e32b4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 1 Jul 2015 09:11:31 +0200 Subject: Cleanup group "see through" design --- build/algorithm.ixx | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'build/algorithm.ixx') diff --git a/build/algorithm.ixx b/build/algorithm.ixx index bd1f9c7..ddd63f6 100644 --- a/build/algorithm.ixx +++ b/build/algorithm.ixx @@ -58,15 +58,35 @@ namespace build } group_view - resolve_group_members_impl (action, target_group&); + resolve_group_members_impl (action, target&); inline group_view - resolve_group_members (action a, target_group& g) + resolve_group_members (action a, target& g) { - group_view r (g.members (a)); + group_view r (g.group_members (a)); return r.members != nullptr ? r : resolve_group_members_impl (a, g); } + inline void + search_and_match_prerequisites (action a, target& t) + { + search_and_match_prerequisites ( + a, t, a.operation () != clean_id ? dir_path () : t.dir); + } + + inline void + search_and_match_prerequisite_members (action a, target& t) + { + if (a.operation () != clean_id) + search_and_match_prerequisite_members (a, t, dir_path ()); + else + // Note that here we don't iterate over members even for see + // through groups since the group target should clean eveything + // up. A bit of an optimization. + // + search_and_match_prerequisites (a, t, t.dir); + } + target_state execute_impl (action, target&); -- cgit v1.1