summaryrefslogtreecommitdiffstats
path: root/src/clean.cc
diff options
context:
space:
mode:
authorunknown <petr@meloun.(none)>2012-02-09 21:23:35 (GMT)
committerunknown <petr@meloun.(none)>2012-02-09 21:23:35 (GMT)
commitaf070e520806987bd3b175bf222774de923b62dd (patch)
tree0eff2859034dd46b6cbd8bd93fed41b8824e642e /src/clean.cc
parent7504ab4e5dbb153979333c67a8a43448040b718d (diff)
downloadNinja-af070e520806987bd3b175bf222774de923b62dd.zip
Ninja-af070e520806987bd3b175bf222774de923b62dd.tar.gz
Ninja-af070e520806987bd3b175bf222774de923b62dd.tar.bz2
Response files
Diffstat (limited to 'src/clean.cc')
-rw-r--r--src/clean.cc10
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());
}
}
}