aboutsummaryrefslogtreecommitdiff
path: root/build/algorithm.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-07-01 09:11:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-07-01 09:11:31 +0200
commit17b3a78696f0b1fd6f0f60d53ec568cf3b9e32b4 (patch)
treef54f92e5066e1a97a070af248931316cd76b61c3 /build/algorithm.ixx
parent70af0087d8efb3f2f7dc9ffdf2568419913f16da (diff)
Cleanup group "see through" design
Diffstat (limited to 'build/algorithm.ixx')
-rw-r--r--build/algorithm.ixx26
1 files changed, 23 insertions, 3 deletions
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&);