summaryrefslogtreecommitdiffstats
path: root/src/clean.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/clean.cc')
-rw-r--r--src/clean.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/clean.cc b/src/clean.cc
index 2565c28..3fe23ec 100644
--- a/src/clean.cc
+++ b/src/clean.cc
@@ -127,6 +127,8 @@ void Cleaner::DoCleanTarget(Node* target) {
// Do not try to remove phony targets
if (!e->is_phony()) {
Remove(target->path());
+ if (!target->in_edge()->rule().depfile().empty())
+ Remove(target->in_edge()->EvaluateDepFile());
if (e->HasRspFile())
Remove(e->GetRspFile());
}
@@ -189,6 +191,8 @@ void Cleaner::DoCleanRule(const Rule* rule) {
for (vector<Node*>::iterator out_node = (*e)->outputs_.begin();
out_node != (*e)->outputs_.end(); ++out_node) {
Remove((*out_node)->path());
+ if (!(*e)->rule().depfile().empty())
+ Remove((*e)->EvaluateDepFile());
if ((*e)->HasRspFile())
Remove((*e)->GetRspFile());
}