diff options
Diffstat (limited to 'src/build.cc')
-rw-r--r-- | src/build.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/build.cc b/src/build.cc index cd1618c..ebf63b2 100644 --- a/src/build.cc +++ b/src/build.cc @@ -577,14 +577,13 @@ void Builder::FinishEdge(Edge* edge, bool success, const string& output) { for (vector<Node*>::iterator i = edge->outputs_.begin(); i != edge->outputs_.end(); ++i) { - if ((*i)->exists()) { - TimeStamp new_mtime = disk_interface_->Stat((*i)->path()); - if ((*i)->mtime() == new_mtime) { - // The rule command did not change the output. Propagate the clean - // state through the build graph. - plan_.CleanNode(log_, *i); - node_cleaned = true; - } + TimeStamp new_mtime = disk_interface_->Stat((*i)->path()); + if ((*i)->mtime() == new_mtime) { + // The rule command did not change the output. Propagate the clean + // state through the build graph. + // Note that this also applies to nonexistent outputs (mtime == 0). + plan_.CleanNode(log_, *i); + node_cleaned = true; } } |