summaryrefslogtreecommitdiffstats
path: root/manual.asciidoc
diff options
context:
space:
mode:
Diffstat (limited to 'manual.asciidoc')
-rw-r--r--manual.asciidoc27
1 files changed, 27 insertions, 0 deletions
diff --git a/manual.asciidoc b/manual.asciidoc
index 80dfc50..7ea3da8 100644
--- a/manual.asciidoc
+++ b/manual.asciidoc
@@ -313,6 +313,33 @@ graph layout tool. Use it like: +ninja -t graph _target_ | dot -Tpng
-ograph.png /dev/stdin+ . In the Ninja source tree, `ninja graph`
generates an image for Ninja itself.
+`targets`:: output a list of targets either by rule or by depth. If used
+like this +ninja -t targets rule _name_+ it prints the list of targets
+using the given rule to be built. If no rule is given, it prints the source
+files (the leaf of the graph). If used like this
++ninja -t targets depth _digit_+ it
+prints the list of targets in a depth-first manner starting by the root
+targets (the ones with no outputs). Indentation is used to mark dependencies.
+If the depth is zero it prints all targets. If no arguments are provided
++ninja -t targets depth 1+ is assumed. In this mode targets may be listed
+several times. If used like this +ninja -t targets all+ it
+prints all the targets available without indentation and it is way faster
+than the _depth_ mode. It returns non-zero if an error occurs.
+
+`rules`:: output the list of all rules with their description if they have
+one. It can be used to know which rule name to pass to
++ninja -t targets rule _name_+.
+
+`clean`:: remove built files. If used like this +ninja -t clean+ it
+removes all the built files. If used like this
++ninja -t clean _targets..._+ or like this
++ninja -t clean target _targets..._+ it removes the given targets and
+recursively all files built for it. If used like this
++ninja -t clean rule _rules_+ it removes all files built using the given
+rules. The depfiles are not removed. Files created but not referenced in
+the graph are not removed. This tool takes in account the +-v+ and the
++-n+ options (note that +-n+ implies +-v+). It returns non-zero if an
+error occurs.
Ninja file reference
--------------------