aboutsummaryrefslogtreecommitdiff
path: root/build2/algorithm.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-06-29 10:39:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-06-29 10:39:26 +0200
commit50e1ffc8f9c48e3e81bd5fa38381193942182df3 (patch)
treebefd6198abbbfbee98c2d87f48bb06b667941415 /build2/algorithm.cxx
parent67b17701d5b1753dc6aaf5a63a4dc2ef2642ba83 (diff)
Use depdb to track changes to cli compiler, options, etc
Diffstat (limited to 'build2/algorithm.cxx')
-rw-r--r--build2/algorithm.cxx29
1 files changed, 29 insertions, 0 deletions
diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx
index 5dc3637..c46e878 100644
--- a/build2/algorithm.cxx
+++ b/build2/algorithm.cxx
@@ -2056,4 +2056,33 @@ namespace build2
r |= reverse_execute_prerequisites (a, g);
return r;
}
+
+ target_state
+ perform_clean_group_depdb (action a, const target& g)
+ {
+ // The same twisted target state merging logic as in clean_extra().
+ //
+ target_state er (target_state::unchanged);
+ path ep;
+
+ group_view gv (g.group_members (a));
+ if (gv.count != 0)
+ {
+ ep = gv.members[0]->as<file> ().path () + ".d";
+
+ if (rmfile (ep, 3))
+ er = target_state::changed;
+ }
+
+ target_state tr (perform_clean_group (a, g));
+
+ if (tr != target_state::changed && er == target_state::changed)
+ {
+ if (verb > (current_diag_noise ? 0 : 1) && verb < 3)
+ text << "rm " << ep;
+ }
+
+ tr |= er;
+ return tr;
+ }
}