From 747ff339c4be7d271a33996638b3b026a166d805 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 17 Dec 2016 11:48:40 +0200 Subject: Don't try to test out-of-project prerequisites --- build2/algorithm.cxx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'build2/algorithm.cxx') 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 @@ -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); -- cgit v1.1