diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-09-19 01:56:15 (GMT) |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-10-24 00:16:38 (GMT) |
commit | 0efbbbf67a94452919084765e87106e7748274cb (patch) | |
tree | 21c8c5a13b70d7f287b2f569a35f6a03a7f1c19d /doc/manual.asciidoc | |
parent | 386cbf6c7e49c88b87f54619b06670ea9f66c8a5 (diff) | |
download | Ninja-0efbbbf67a94452919084765e87106e7748274cb.zip Ninja-0efbbbf67a94452919084765e87106e7748274cb.tar.gz Ninja-0efbbbf67a94452919084765e87106e7748274cb.tar.bz2 |
Implement restat rules
A restat rule is a rule which is capable of pruning the build tree
depending on the timestamps of its outputs before and after a build.
After a restat rule is rebuilt, Ninja will re-stat each output file
to obtain its current timestamp. If the timestamp is unchanged from
when Ninja initially stat'ed the file before starting the build,
Ninja will mark that output file as clean, and recursively for each
reverse dependency of the output file, recompute its dirty status.
Ninja then stores the most recent timestamp of any input file in the
build log entry associated with the output file. This timestamp
will be treated by future invocations of Ninja as the output file's
modification time instead of the output file's actual modification
time for the purpose of deciding whether it is dirty (but not whether
its reverse dependencies are dirty).
Diffstat (limited to 'doc/manual.asciidoc')
-rw-r--r-- | doc/manual.asciidoc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/manual.asciidoc b/doc/manual.asciidoc index 7fd2715..d59f471 100644 --- a/doc/manual.asciidoc +++ b/doc/manual.asciidoc @@ -469,6 +469,12 @@ aborting due to a missing input. if the command line changes; and secondly, they are not cleaned by default. +`restat`:: if present, causes Ninja to re-stat the command's outputs after + execution of the command. Each output whose modification time the command + did not change will be treated as though it had never needed to be built. + This may cause the output's reverse dependencies to be removed from the + list of pending build actions. + Additionally, the special `$in` and `$out` variables expand to the space-separated list of files provided to the `build` line referencing this `rule`. |