diff options
Diffstat (limited to 'src/graph.cc')
-rw-r--r-- | src/graph.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/graph.cc b/src/graph.cc index 9654c1a..3567bfa 100644 --- a/src/graph.cc +++ b/src/graph.cc @@ -38,8 +38,13 @@ bool Edge::RecomputeDirty(State* state, DiskInterface* disk_interface, outputs_ready_ = true; if (!rule_->depfile().empty()) { - if (!LoadDepFile(state, disk_interface, err)) - return false; + if (!LoadDepFile(state, disk_interface, err)) { + if (!err->empty()) + return false; + EXPLAIN("Edge targets are dirty because depfile '%s' is missing", + EvaluateDepFile().c_str()); + dirty = true; + } } // Visit all inputs; we're dirty if any of the inputs are dirty. @@ -274,8 +279,9 @@ bool Edge::LoadDepFile(State* state, DiskInterface* disk_interface, string content = disk_interface->ReadFile(path, err); if (!err->empty()) return false; + // On a missing depfile: return false and empty *err. if (content.empty()) - return true; + return false; DepfileParser depfile; string depfile_err; |