From 568aab7f19cc9bbb42c7fb4afef541a79459d657 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 14 Feb 2016 15:17:56 +0200 Subject: Revert back to only cleaning targets in subdirectories Cleaning everything as long as it is in the same strong amalgamation had some undesirable side effects. For example, in bpkg, upgrading a package (which requires clean/reconfigure) led to all its prerequisite being cleaned as well and then rebuilt. That was very surprising. --- build2/cxx/compile.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'build2/cxx/compile.cxx') diff --git a/build2/cxx/compile.cxx b/build2/cxx/compile.cxx index a1abfcb..22a25cb 100644 --- a/build2/cxx/compile.cxx +++ b/build2/cxx/compile.cxx @@ -78,13 +78,8 @@ namespace build2 // code (below) takes care of the ones it is adding. // // When cleaning, ignore prerequisites that are not in the same - // or a subdirectory of our strong amalgamation. + // or a subdirectory of ours. // - const dir_path* amlg ( - a.operation () != clean_id - ? nullptr - : &t.strong_scope ().out_path ()); - link::search_paths_cache lib_paths; // Extract lazily. for (prerequisite_member p: group_prerequisite_members (a, t)) @@ -117,7 +112,7 @@ namespace build2 target& pt (p.search ()); - if (a.operation () == clean_id && !pt.dir.sub (*amlg)) + if (a.operation () == clean_id && !pt.dir.sub (t.dir)) continue; build2::match (a, pt); -- cgit v1.1