aboutsummaryrefslogtreecommitdiff
path: root/build2/cxx/compile.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-14 15:17:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-14 15:17:56 +0200
commit568aab7f19cc9bbb42c7fb4afef541a79459d657 (patch)
treedb9324f02442bb82fadfc14da7f57feded9deab0 /build2/cxx/compile.cxx
parent4e665067ff264c55086fdfb776a95b0fbb4d432c (diff)
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.
Diffstat (limited to 'build2/cxx/compile.cxx')
-rw-r--r--build2/cxx/compile.cxx9
1 files changed, 2 insertions, 7 deletions
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);