diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-04-22 05:03:20 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-04-22 05:03:20 (GMT) |
commit | 01ae2fbae0fc44171ecddcbdeee1a572b477a691 (patch) | |
tree | 2656b8059853392f494e351ca0915fafaa9a2799 | |
parent | a83020b750e7b3c8c801fcf79ebe94d7dd4840dd (diff) | |
download | Ninja-01ae2fbae0fc44171ecddcbdeee1a572b477a691.zip Ninja-01ae2fbae0fc44171ecddcbdeee1a572b477a691.tar.gz Ninja-01ae2fbae0fc44171ecddcbdeee1a572b477a691.tar.bz2 |
keep dry run more similar to normal run
-rw-r--r-- | src/build.cc | 6 |
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()); |