diff options
author | wolfp <petr@wulf.cz> | 2012-05-22 11:39:40 (GMT) |
---|---|---|
committer | wolfp <petr@wulf.cz> | 2012-06-27 08:37:37 (GMT) |
commit | ec228f1e449c8e8cab4cc286b520a40c1e2431c4 (patch) | |
tree | fbfac5249b7558d2bfaed3f1db8863fb63046705 /src/build.cc | |
parent | 8aebe7d32e6b54312985be37e42dcb11b5a48f33 (diff) | |
download | Ninja-ec228f1e449c8e8cab4cc286b520a40c1e2431c4.zip Ninja-ec228f1e449c8e8cab4cc286b520a40c1e2431c4.tar.gz Ninja-ec228f1e449c8e8cab4cc286b520a40c1e2431c4.tar.bz2 |
Do not reset restat_mtime if an input is missing (issue #295)
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 157442d..7eb3f24 100644 --- a/src/build.cc +++ b/src/build.cc @@ -749,19 +749,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; } |