diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-07-10 11:52:48 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-07-10 11:52:48 +0200 |
commit | e52f530cb00da2c339badd2c0ad9fc99b88a4400 (patch) | |
tree | 368bd839d52d8a5295b74f02c413e6f46d4aba11 | |
parent | ddc5b76007bd4524f27a7449bcd4a5e21f8d797d (diff) |
Relax prerequisite filtering semantics of aliases for clean operation
This is analogous to what has been done to test and install a couple of
commits before.
-rw-r--r-- | libbuild2/algorithm.hxx | 5 | ||||
-rw-r--r-- | libbuild2/algorithm.ixx | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/libbuild2/algorithm.hxx b/libbuild2/algorithm.hxx index 33bc624..2a07acf 100644 --- a/libbuild2/algorithm.hxx +++ b/libbuild2/algorithm.hxx @@ -343,8 +343,9 @@ namespace build2 // The standard prerequisite search and match implementations. They call // search() (unless a custom is provided) and then match() (unless custom // returned NULL) for each prerequisite in a loop omitting out of project - // prerequisites for the clean operation. If this target is a member of a - // group, then first do this to the group's prerequisites. + // prerequisites for the clean operation unless the target is an alias. If + // the target is a member of a group, then first do this to the group's + // prerequisites. // using match_search = function< prerequisite_target (action, diff --git a/libbuild2/algorithm.ixx b/libbuild2/algorithm.ixx index d75ad16..9d77d61 100644 --- a/libbuild2/algorithm.ixx +++ b/libbuild2/algorithm.ixx @@ -498,14 +498,16 @@ namespace build2 a, t, ms, - (a.operation () != clean_id ? nullptr : &t.root_scope ())); + (a.operation () != clean_id || t.is_a<alias> () + ? nullptr + : &t.root_scope ())); } inline void match_prerequisite_members (action a, target& t, const match_search_member& msm) { - if (a.operation () != clean_id) + if (a.operation () != clean_id || t.is_a<alias> ()) match_prerequisite_members (a, t, msm, nullptr); else { |