diff options
author | Jan Niklas Hasse <jhasse@bixense.com> | 2019-07-09 12:43:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-09 12:43:16 (GMT) |
commit | e0bc2e5fd9036a31d507881e1383adde3672aaef (patch) | |
tree | 57eeeaa192ba706deb4f8bc6f380f8a703c9ee04 /doc/manual.asciidoc | |
parent | 4d3b315329a46ad18c845948c6a22dc54edc6b0b (diff) | |
parent | 5a3a06afd218c1f913a843c63dc58ad6e40c6535 (diff) | |
download | Ninja-e0bc2e5fd9036a31d507881e1383adde3672aaef.zip Ninja-e0bc2e5fd9036a31d507881e1383adde3672aaef.tar.gz Ninja-e0bc2e5fd9036a31d507881e1383adde3672aaef.tar.bz2 |
Merge pull request #1016 from moroten/docs-empty-rule-uptodate
Describe how to make a phony rule always up to date
Diffstat (limited to 'doc/manual.asciidoc')
-rw-r--r-- | doc/manual.asciidoc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/manual.asciidoc b/doc/manual.asciidoc index 7f3ab8a..e49d26d 100644 --- a/doc/manual.asciidoc +++ b/doc/manual.asciidoc @@ -452,6 +452,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 ~~~~~~~~~~~~~~~~~~~~~~~~~ |