summaryrefslogtreecommitdiffstats
path: root/src/graph.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-09-14 15:55:46 (GMT)
committerEvan Martin <martine@danga.com>2011-09-14 15:55:46 (GMT)
commit5d92beafdadc6c531fa1c4c000464dea3e4c046c (patch)
treea888a3578c1d2eaf452d9f86273aa7cbadad136c /src/graph.cc
parent3fbb25b2cc66f236a39b728d20e5d44da23612ac (diff)
parentf14039d44a93b7717e5335a371ea22fe4561aaf8 (diff)
downloadNinja-5d92beafdadc6c531fa1c4c000464dea3e4c046c.zip
Ninja-5d92beafdadc6c531fa1c4c000464dea3e4c046c.tar.gz
Ninja-5d92beafdadc6c531fa1c4c000464dea3e4c046c.tar.bz2
Merge pull request #107 from pcc/missing-phony
Consider missing phony targets with no dependencies out of date
Diffstat (limited to 'src/graph.cc')
-rw-r--r--src/graph.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/graph.cc b/src/graph.cc
index 5c37ac0..9c99b3d 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -77,9 +77,12 @@ bool Edge::RecomputeDirty(State* state, DiskInterface* disk_interface,
if (is_phony()) {
// Phony edges don't write any output.
- // They're only dirty if an input is dirty.
+ // They're only dirty if an input is dirty, or if there are no inputs
+ // and we're missing the output.
if (dirty)
(*i)->dirty_ = true;
+ else if (inputs_.empty() && !(*i)->file_->exists())
+ (*i)->dirty_ = true;
continue;
}