From 7f9fda79a0e96bbeeaee4e6b05f9ae5e1738d88a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 16 Mar 2016 16:21:07 +0200 Subject: Change prerequisite cleaning "limit" from subdirectories to same project One day we will get this right. --- build2/cxx/link.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'build2/cxx/link.cxx') diff --git a/build2/cxx/link.cxx b/build2/cxx/link.cxx index f9fa69d..5ed36b7 100644 --- a/build2/cxx/link.cxx +++ b/build2/cxx/link.cxx @@ -543,7 +543,7 @@ namespace build2 // files as well as search and match. // // When cleaning, ignore prerequisites that are not in the same - // or a subdirectory of ours. + // or a subdirectory of our project root. // for (prerequisite_member p: group_prerequisite_members (a, t)) { @@ -562,7 +562,7 @@ namespace build2 if (pt == nullptr) pt = &p.search (); - if (a.operation () == clean_id && !pt->dir.sub (t.dir)) + if (a.operation () == clean_id && !pt->dir.sub (rs.out_path ())) continue; // Skip. // If this is the obj{} or lib{} target group, then pick the @@ -624,9 +624,9 @@ namespace build2 target& ot (search (o_type, d, *cp.tk.name, nullptr, cp.scope)); // If we are cleaning, check that this target is in the same or - // a subdirectory of ours. + // a subdirectory of our project root. // - if (a.operation () == clean_id && !ot.dir.sub (t.dir)) + if (a.operation () == clean_id && !ot.dir.sub (rs.out_path ())) { // If we shouldn't clean obj{}, then it is fair to assume // we shouldn't clean cxx{} either (generated source will -- cgit v1.1