diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-12-17 11:48:40 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-12-17 11:48:40 +0200 |
commit | 747ff339c4be7d271a33996638b3b026a166d805 (patch) | |
tree | 3ffd726a68ca8b7125fecdf4be8f87e1afeee99d /build2/algorithm.cxx | |
parent | a21902d3764aa64f1579f1b1bf2831789890d0da (diff) |
Don't try to test out-of-project prerequisites
Diffstat (limited to 'build2/algorithm.cxx')
-rw-r--r-- | build2/algorithm.cxx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx index dbdf81c..7a3b773 100644 --- a/build2/algorithm.cxx +++ b/build2/algorithm.cxx @@ -49,7 +49,7 @@ namespace build2 // @@ OUT: for now we assume the prerequisite's out is undetermined. // Would need to pass a pair of names. // - return search (*tt, n.dir, dir_path (), n.value, e, &s); + return search (*tt, n.dir, dir_path (), n.value, e, &s, n.proj); } pair<const rule*, match_result> @@ -275,15 +275,13 @@ namespace build2 } void - search_and_match_prerequisites (action a, target& t, const dir_path& d) + search_and_match_prerequisites (action a, target& t, scope* s) { - const bool e (d.empty ()); - for (prerequisite p: group_prerequisites (t)) { target& pt (search (p)); - if (e || pt.dir.sub (d)) + if (s == nullptr || pt.in (*s)) { match (a, pt); t.prerequisite_targets.push_back (&pt); @@ -292,17 +290,13 @@ namespace build2 } void - search_and_match_prerequisite_members (action a, - target& t, - const dir_path& d) + search_and_match_prerequisite_members (action a, target& t, scope* s) { - const bool e (d.empty ()); - for (prerequisite_member p: group_prerequisite_members (a, t)) { target& pt (p.search ()); - if (e || pt.dir.sub (d)) + if (s == nullptr || pt.in (*s)) { match (a, pt); t.prerequisite_targets.push_back (&pt); |