summaryrefslogtreecommitdiffstats
path: root/src/graph.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-10-17 22:16:49 (GMT)
committerEvan Martin <martine@danga.com>2011-10-17 22:16:49 (GMT)
commitafbe2185a3bbd2453d6b1c27ee8f7c1cce6371a3 (patch)
tree5d370ccd781409fd459f31adfe9dd9c4989a8562 /src/graph.cc
parent07c1f9b14b5f7071a5def7d09414ec852a4372ef (diff)
parent5a7151a8a6ab989a4016f03306b020df38f21732 (diff)
downloadNinja-afbe2185a3bbd2453d6b1c27ee8f7c1cce6371a3.zip
Ninja-afbe2185a3bbd2453d6b1c27ee8f7c1cce6371a3.tar.gz
Ninja-afbe2185a3bbd2453d6b1c27ee8f7c1cce6371a3.tar.bz2
Merge pull request #120 from pcc/generator
Implement generator rules
Diffstat (limited to 'src/graph.cc')
-rw-r--r--src/graph.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/graph.cc b/src/graph.cc
index 0f16519..e1441ea 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -93,8 +93,10 @@ bool Edge::RecomputeDirty(State* state, DiskInterface* disk_interface,
(*i)->dirty_ = true;
} else {
// May also be dirty due to the command changing since the last build.
+ // But if this is a generator rule, the command changing does not make us
+ // dirty.
BuildLog::LogEntry* entry;
- if (state->build_log_ &&
+ if (!rule_->generator_ && state->build_log_ &&
(entry = state->build_log_->LookupByOutput((*i)->file_->path_))) {
if (command != entry->command)
(*i)->dirty_ = true;