diff options
Diffstat (limited to 'src/build.cc')
-rw-r--r-- | src/build.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/build.cc b/src/build.cc index c90824d..d3e88ee 100644 --- a/src/build.cc +++ b/src/build.cc @@ -352,8 +352,8 @@ void Plan::CleanNode(BuildLog* build_log, Node* node) { for (vector<Node*>::iterator ni = begin; ni != end; ++ni) if ((*ni)->mtime() > most_recent_input) most_recent_input = (*ni)->mtime(); - string command = (*ei)->EvaluateCommand(); - + string command = (*ei)->EvaluateCommand(true); + // Now, recompute the dirty state of each output. bool all_outputs_clean = true; for (vector<Node*>::iterator ni = (*ei)->outputs_.begin(); @@ -630,6 +630,13 @@ bool Builder::StartEdge(Edge* edge, string* err) { if (!disk_interface_->MakeDirs((*i)->path())) return false; } + + // Create response file, if needed + // XXX: this may also block; do we care? + if (edge->HasRspFile()) { + if (!disk_interface_->WriteFile(edge->GetRspFile(), edge->GetRspFileContent())) + return false; + } // start command computing and run it if (!command_runner_->StartCommand(edge)) { @@ -687,6 +694,10 @@ void Builder::FinishEdge(Edge* edge, bool success, const string& output) { } } + // delete the response file on success (if exists) + if (edge->HasRspFile()) + disk_interface_->RemoveFile(edge->GetRspFile()); + plan_.EdgeFinished(edge); } |