summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-06-18 16:38:48 -0700
committerNico Weber <nicolasweber@gmx.de>2015-06-18 16:38:48 -0700
commit3b799f55857db6c7452ecc3788f8c959a23a3d86 (patch)
tree16d65011486ad5f719598a1f2125c0cff70c0a7a
parentc19ae930025a068e895136317d2b0a91b87ad319 (diff)
parent1d5d08848d8b0b36a043c51b4a83531ffe3516dc (diff)
downloadninja-3b799f55857db6c7452ecc3788f8c959a23a3d86.tar.gz
Merge pull request #970 from nico/explain
Add a missing EXPLAIN() call.
-rw-r--r--src/graph.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/graph.cc b/src/graph.cc
index fcfeba0..355285c 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -55,6 +55,7 @@ bool DependencyScan::RecomputeDirty(Edge* edge, string* err) {
if (!err->empty())
return false;
// Failed to load dependency info: rebuild to regenerate it.
+ // LoadDeps() did EXPLAIN() already, no need to do it here.
dirty = edge->deps_missing_ = true;
}
@@ -142,7 +143,12 @@ bool DependencyScan::RecomputeOutputDirty(Edge* edge,
if (edge->is_phony()) {
// Phony edges don't write any output. Outputs are only dirty if
// there are no inputs and we're missing the output.
- return edge->inputs_.empty() && !output->exists();
+ if (edge->inputs_.empty() && !output->exists()) {
+ EXPLAIN("output %s of phony edge with no inputs doesn't exist",
+ output->path().c_str());
+ return true;
+ }
+ return false;
}
BuildLog::LogEntry* entry = 0;