summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-04-22 05:03:20 (GMT)
committerNico Weber <nicolasweber@gmx.de>2013-04-22 05:03:20 (GMT)
commit01ae2fbae0fc44171ecddcbdeee1a572b477a691 (patch)
tree2656b8059853392f494e351ca0915fafaa9a2799
parenta83020b750e7b3c8c801fcf79ebe94d7dd4840dd (diff)
downloadNinja-01ae2fbae0fc44171ecddcbdeee1a572b477a691.zip
Ninja-01ae2fbae0fc44171ecddcbdeee1a572b477a691.tar.gz
Ninja-01ae2fbae0fc44171ecddcbdeee1a572b477a691.tar.bz2
keep dry run more similar to normal run
-rw-r--r--src/build.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/build.cc b/src/build.cc
index c9842ce..5cf9d27 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -715,9 +715,7 @@ void Builder::FinishCommand(CommandRunner::Result* result) {
// extraction itself can fail, which makes the command fail from a
// build perspective.
vector<Node*> deps_nodes;
- string deps_type;
- if (!config_.dry_run)
- deps_type = edge->GetBinding("deps");
+ string deps_type = edge->GetBinding("deps");
if (!deps_type.empty()) {
string extract_err;
if (!ExtractDeps(result, deps_type, &deps_nodes, &extract_err) &&
@@ -789,7 +787,7 @@ void Builder::FinishCommand(CommandRunner::Result* result) {
restat_mtime);
}
- if (!deps_type.empty()) {
+ if (!deps_type.empty() && !config_.dry_run) {
assert(edge->outputs_.size() == 1 && "should have been rejected by parser");
Node* out = edge->outputs_[0];
TimeStamp deps_mtime = disk_interface_->Stat(out->path());