diff options
author | Evan Martin <martine@danga.com> | 2012-07-03 16:45:37 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-07-03 16:45:37 (GMT) |
commit | 0ca93baf35d3c2b1e70e008276555b5bec2f9f3e (patch) | |
tree | 9d6ab7ec67f13cfe08f1bf1037023e2ae780784e /src/build.cc | |
parent | 358eefbce2f62e8685b6797d395c06f4118b6e05 (diff) | |
parent | 4a083599bb654e894a1f6ce0dc1080b4e8df6f63 (diff) | |
download | Ninja-0ca93baf35d3c2b1e70e008276555b5bec2f9f3e.zip Ninja-0ca93baf35d3c2b1e70e008276555b5bec2f9f3e.tar.gz Ninja-0ca93baf35d3c2b1e70e008276555b5bec2f9f3e.tar.bz2 |
Merge pull request #313 from wolfp/restat_missing_input
Do not reset restat_mtime if an input is missing
Diffstat (limited to 'src/build.cc')
-rw-r--r-- | src/build.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/build.cc b/src/build.cc index 65aa6a9..eed52ae 100644 --- a/src/build.cc +++ b/src/build.cc @@ -739,19 +739,13 @@ void Builder::FinishEdge(Edge* edge, bool success, const string& output) { for (vector<Node*>::iterator i = edge->inputs_.begin(); i != edge->inputs_.end() - edge->order_only_deps_; ++i) { TimeStamp input_mtime = disk_interface_->Stat((*i)->path()); - if (input_mtime == 0) { - restat_mtime = 0; - break; - } if (input_mtime > restat_mtime) restat_mtime = input_mtime; } if (restat_mtime != 0 && !edge->rule().depfile().empty()) { TimeStamp depfile_mtime = disk_interface_->Stat(edge->EvaluateDepFile()); - if (depfile_mtime == 0) - restat_mtime = 0; - else if (depfile_mtime > restat_mtime) + if (depfile_mtime > restat_mtime) restat_mtime = depfile_mtime; } |