summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-09-18 02:28:44 (GMT)
committerPeter Collingbourne <peter@pcc.me.uk>2011-10-24 00:16:24 (GMT)
commit6fc220b8b98d0a89204f144557d935feb775aeca (patch)
treef61cf2a7b574f74cf1e4a7fd0d73003f8c3d4dd2 /doc
parent5ff5891f5bed923b983c0f5a23c16d988d55f30e (diff)
downloadNinja-6fc220b8b98d0a89204f144557d935feb775aeca.zip
Ninja-6fc220b8b98d0a89204f144557d935feb775aeca.tar.gz
Ninja-6fc220b8b98d0a89204f144557d935feb775aeca.tar.bz2
Implement Make-style order-only dependencies
Previously, the implementation of order-only dependencies differed between Make and Ninja in two important ways: 1) If the order-only dependency existed but was out of date, it would never be rebuilt, whereas Make would always rebuild out of date order-only dependencies. 2) If the order-only dependency did not exist, it would cause its reverse dependencies to always build, whereas Make would only rebuild a file if a non-order-only dependency was out of date. A key distinction between Ninja and Make as seen through the above two points was that in Ninja, order-only dependencies cared about whether the target as a file exists (so perhaps a better name for the old semantics would have been "missing-only dependencies"). These differences made it impossible to introduce an order-only dependency on an always out-of-date (i.e. missing) target without also causing the depender and its reverse dependencies to rebuild unnecessarily on every build. Build systems which must perform some action (such as logging the build start time, or printing a message) at the start of every build typically implement this by adding to every target an order-only dependency which performs this action, which would have forced an entire rebuild on every invocation of Ninja under the old semantics. This commit causes Ninja to conform to the Make-style behaviour.
Diffstat (limited to 'doc')
-rw-r--r--doc/manual.asciidoc6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/manual.asciidoc b/doc/manual.asciidoc
index ff197b1..7fd2715 100644
--- a/doc/manual.asciidoc
+++ b/doc/manual.asciidoc
@@ -502,9 +502,9 @@ Note that dependencies as loaded through depfiles have slightly different
semantics, as described in the <<ref_rule,rule reference>>.
3. _Order-only dependencies_, expressed with the syntax +|| _dep1_
- _dep2_+ on the end of a build line. When these are missing, the
- output is not rebuilt until they are built, but once they are
- available further changes to the files do not affect the output.
+ _dep2_+ on the end of a build line. When these are out of date, the
+ output is not rebuilt until they are built, but changes in order-only
+ dependencies alone do not cause the output to be rebuilt.
+
Order-only dependencies can be useful for bootstrapping dependencies
that are only discovered during build time: for example, to generate a