summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Medley <fredrik.medley@gmail.com>2015-06-02 16:30:57 +0200
committerFredrik Medley <fredrik.medley@autoliv.com>2017-08-16 07:09:47 +0200
commit5a3a06afd218c1f913a843c63dc58ad6e40c6535 (patch)
treeb9fc94bdeee8e5f74f83488c47879df11aea2609
parent7bbc708ff08f5660f4cff4b3e8c675bec428a1f2 (diff)
downloadninja-5a3a06afd218c1f913a843c63dc58ad6e40c6535.tar.gz
Describe how to make a phony rule always up to date
A phony rule with no input is always out of date. Describe how to make a rule always up to date. Signed-off-by: Fredrik Medley <fredrik.medley@gmail.com>
-rw-r--r--doc/manual.asciidoc8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/manual.asciidoc b/doc/manual.asciidoc
index d7ec932..df4199a 100644
--- a/doc/manual.asciidoc
+++ b/doc/manual.asciidoc
@@ -445,6 +445,14 @@ without any dependencies, the target will be considered out of date if
it does not exist. Without a phony build statement, Ninja will report
an error if the file does not exist and is required by the build.
+To create a rule that never rebuilds, use a build rule without any input:
+----------------
+rule touch
+ command = touch $out
+build file_that_always_exists.dummy: touch
+build dummy_target_to_follow_a_pattern: phony file_that_always_exists.dummy
+----------------
+
Default target statements
~~~~~~~~~~~~~~~~~~~~~~~~~