diff options
author | Evan Martin <martine@danga.com> | 2011-02-11 16:36:44 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-02-27 23:01:35 (GMT) |
commit | 613af34675303acbe6b282ad46dde73a04eb9105 (patch) | |
tree | 8880fc173718fb54c9abc79f26c17fdec84c2df5 /manual.asciidoc | |
parent | 349508070a81e0026681f930966e2cf886df4910 (diff) | |
download | Ninja-613af34675303acbe6b282ad46dde73a04eb9105.zip Ninja-613af34675303acbe6b282ad46dde73a04eb9105.tar.gz Ninja-613af34675303acbe6b282ad46dde73a04eb9105.tar.bz2 |
doc phony actions
Diffstat (limited to 'manual.asciidoc')
-rw-r--r-- | manual.asciidoc | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/manual.asciidoc b/manual.asciidoc index 3038d46..80dfc50 100644 --- a/manual.asciidoc +++ b/manual.asciidoc @@ -34,8 +34,8 @@ program (like the `./configure` found in autotools projects) can analyze system dependencies and make as many decisions as possible up front so that incremental builds stay fast. Going beyond autotools, even build-time decisions like "which compiler flags should I use?" -or "should a build a debug or release-mode binary?" belong in the -ninjafile generator. +or "should I build a debug or release-mode binary?" belong in the +`.ninja` file generator. Conceptual overview ~~~~~~~~~~~~~~~~~~~ @@ -253,6 +253,24 @@ statement to the rule (for example, if the rule needs "the file extension of the first input"), pass that through as an extra variable, like how `cflags` is passed above. + +The `phony` rule +~~~~~~~~~~~~~~~~ + +The special rule name `phony` can be used to create aliases for other +targets. For example: + +---------------- +build all: phony some/file/in/a/faraway/subdir +---------------- + +This makes `ninja all` build the other files. Semantically, the +`phony` rule is equivalent to a plain rule where the `command` does +nothing, but phony rules are handled specially in that they aren't +printed when run, logged (see below), nor do they contribute to the +command count printed as part of the build process. + + The Ninja log ~~~~~~~~~~~~~ |