diff options
author | Evan Martin <martine@danga.com> | 2013-04-08 17:20:58 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2013-04-09 04:04:55 (GMT) |
commit | 0397155218f3d311200ec4e25786028f14c53c6a (patch) | |
tree | 7e68d3f5403c4e6979541c2c9922d2248163467c /src/build.cc | |
parent | 8ec425abe38f468bc4bbb4c95d78fab3b93d2141 (diff) | |
download | Ninja-0397155218f3d311200ec4e25786028f14c53c6a.zip Ninja-0397155218f3d311200ec4e25786028f14c53c6a.tar.gz Ninja-0397155218f3d311200ec4e25786028f14c53c6a.tar.bz2 |
add a test for the "deps out of date" case
It touched the various remaining XXXes in the code, hooray.
Diffstat (limited to 'src/build.cc')
-rw-r--r-- | src/build.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/build.cc b/src/build.cc index 0caf6e7..2d3d9b4 100644 --- a/src/build.cc +++ b/src/build.cc @@ -872,11 +872,13 @@ void Builder::FinishCommand(CommandRunner::Result* result) { restat_mtime); } - if (!deps_type.empty() && scan_.deps_log()) { + if (!deps_type.empty()) { assert(edge->outputs_.size() == 1); Node* out = edge->outputs_[0]; - // XXX need to restat for restat_mtime. - scan_.deps_log()->RecordDeps(out, restat_mtime, deps_nodes); + TimeStamp mtime = disk_interface_->Stat(out->path()); + // XXX we could reuse the restat logic to avoid a second stat, + // but in practice we only care about the single output. + scan_.deps_log()->RecordDeps(out, mtime, deps_nodes); } } |