diff options
author | unknown <petr@meloun.(none)> | 2012-02-09 21:23:35 (GMT) |
---|---|---|
committer | unknown <petr@meloun.(none)> | 2012-02-09 21:23:35 (GMT) |
commit | af070e520806987bd3b175bf222774de923b62dd (patch) | |
tree | 0eff2859034dd46b6cbd8bd93fed41b8824e642e /src/clean.cc | |
parent | 7504ab4e5dbb153979333c67a8a43448040b718d (diff) | |
download | Ninja-af070e520806987bd3b175bf222774de923b62dd.zip Ninja-af070e520806987bd3b175bf222774de923b62dd.tar.gz Ninja-af070e520806987bd3b175bf222774de923b62dd.tar.bz2 |
Response files
Diffstat (limited to 'src/clean.cc')
-rw-r--r-- | src/clean.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/clean.cc b/src/clean.cc index bb912f6..6524ce0 100644 --- a/src/clean.cc +++ b/src/clean.cc @@ -106,13 +106,17 @@ int Cleaner::CleanAll(bool generator) { continue; // Do not remove generator's files unless generator specified. if (!generator && (*e)->rule().generator()) - continue; + continue; for (vector<Node*>::iterator out_node = (*e)->outputs_.begin(); out_node != (*e)->outputs_.end(); ++out_node) { Remove((*out_node)->path()); } + // Remove the depfile if (!(*e)->rule().depfile().empty()) Remove((*e)->EvaluateDepFile()); + // Remove the response file + if ((*e)->HasRspFile()) + Remove((*e)->GetRspFile()); } PrintFooter(); return status_; @@ -121,6 +125,8 @@ int Cleaner::CleanAll(bool generator) { void Cleaner::DoCleanTarget(Node* target) { if (target->in_edge()) { Remove(target->path()); + if (target->in_edge()->HasRspFile()) + Remove(target->in_edge()->GetRspFile()); for (vector<Node*>::iterator n = target->in_edge()->inputs_.begin(); n != target->in_edge()->inputs_.end(); ++n) { @@ -181,6 +187,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)->HasRspFile()) + Remove((*e)->GetRspFile()); } } } |