if ((*i)->file_->StatIfNecessary(stat_helper)) {
if (Edge* edge = (*i)->in_edge_)
edge->RecomputeDirty(stat_helper);
+ else
+ (*i)->dirty_ = !(*i)->file_->exists();
}
if ((*i)->dirty_)
dirty = true;
};
void BuildTest::Dirty(const string& path) {
- GetNode(path)->MarkDirty();
+ Node* node = GetNode(path);
+ node->MarkDirty();
+
+ // If it's an input file, mark that we've already stat()ed it and
+ // it's missing.
+ if (!node->in_edge_)
+ node->file_->mtime_ = 0;
}
void BuildTest::Touch(const string& path) {