summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJan Niklas Hasse <jhasse@bixense.com>2024-04-11 16:44:05 (GMT)
committerJan Niklas Hasse <jhasse@bixense.com>2024-04-11 16:44:05 (GMT)
commit65d0dfcbbea6b8ca7d8a3a0f673ecb522379e43c (patch)
tree7b30fc5f0a477efd075ab0f8eead78aa7554869b /doc
parent448ae1ccacd17025457ace965d78a45a113c70c6 (diff)
parent1dcebc6399dc76a9bdf643ad9722d7f2d7fee51c (diff)
downloadNinja-65d0dfcbbea6b8ca7d8a3a0f673ecb522379e43c.zip
Ninja-65d0dfcbbea6b8ca7d8a3a0f673ecb522379e43c.tar.gz
Ninja-65d0dfcbbea6b8ca7d8a3a0f673ecb522379e43c.tar.bz2
v1.12.0v1.12.0
Diffstat (limited to 'doc')
-rw-r--r--doc/manual.asciidoc42
-rw-r--r--doc/style.css26
2 files changed, 50 insertions, 18 deletions
diff --git a/doc/manual.asciidoc b/doc/manual.asciidoc
index 659c68b..d7dc490 100644
--- a/doc/manual.asciidoc
+++ b/doc/manual.asciidoc
@@ -1,6 +1,6 @@
The Ninja build system
======================
-v1.11.1, Aug 2022
+v1.12.0, Apr 2024
Introduction
@@ -25,7 +25,7 @@ Where other build systems are high-level languages, Ninja aims to be
an assembler.
Build systems get slow when they need to make decisions. When you are
-in a edit-compile cycle you want it to be as fast as possible -- you
+in an edit-compile cycle you want it to be as fast as possible -- you
want the build system to do the minimum work necessary to figure out
what needs to be built immediately.
@@ -205,7 +205,11 @@ Several placeholders are available:
`%o`:: Overall rate of finished edges per second
`%c`:: Current rate of finished edges per second (average over builds
specified by `-j` or its default)
-`%e`:: Elapsed time in seconds. _(Available since Ninja 1.2.)_
+`%e`:: Elapsed time in seconds. _(Available since Ninja 1.2.)_
+`%E`:: Remaining time (ETA) in seconds. _(Available since Ninja 1.12.)_
+`%w`:: Elapsed time in [h:]mm:ss format. _(Available since Ninja 1.12.)_
+`%W`:: Remaining time (ETA) in [h:]mm:ss format. _(Available since Ninja 1.12.)_
+`%P`:: The percentage (in ppp% format) of time elapsed out of predicted total runtime. _(Available since Ninja 1.12.)_
`%%`:: A plain `%` character.
The default progress status is `"[%f/%t] "` (note the trailing space
@@ -223,14 +227,14 @@ found useful during Ninja's development. The current tools are:
`browse`:: browse the dependency graph in a web browser. Clicking a
file focuses the view on that file, showing inputs and outputs. This
-feature requires a Python installation. By default port 8000 is used
+feature requires a Python installation. By default, port 8000 is used
and a web browser will be opened. This can be changed as follows:
+
----
ninja -t browse --port=8000 --no-browser mytarget
----
+
-`graph`:: output a file in the syntax used by `graphviz`, a automatic
+`graph`:: output a file in the syntax used by `graphviz`, an automatic
graph layout tool. Use it like:
+
----
@@ -262,7 +266,7 @@ output files are out of date.
rebuild those targets.
_Available since Ninja 1.11._
-`clean`:: remove built files. By default it removes all built files
+`clean`:: remove built files. By default, it removes all built files
except for those created by the generator. Adding the `-g` flag also
removes built files created by the generator (see <<ref_rule,the rule
reference for the +generator+ attribute>>). Additional arguments are
@@ -325,20 +329,19 @@ Where `ENVFILE` is a binary file that contains an environment block suitable
for CreateProcessA() on Windows (i.e. a series of zero-terminated strings that
look like NAME=VALUE, followed by an extra zero terminator). Note that this uses
the local codepage encoding.
-
++
This tool also supports a deprecated way of parsing the compiler's output when
-the `/showIncludes` flag is used, and generating a GCC-compatible depfile from it.
+the `/showIncludes` flag is used, and generating a GCC-compatible depfile from it:
+
----
+----
ninja -t msvc -o DEPFILE [-p STRING] -- cl.exe /showIncludes <arguments>
----
+----
+
-
When using this option, `-p STRING` can be used to pass the localized line prefix
that `cl.exe` uses to output dependency information. For English-speaking regions
this is `"Note: including file: "` without the double quotes, but will be different
for other regions.
-
++
Note that Ninja supports this natively now, with the use of `deps = msvc` and
`msvc_deps_prefix` in Ninja files. Native support also avoids launching an extra
tool process each time the compiler must be called, which can speed up builds
@@ -675,14 +678,14 @@ Ninja supports this processing in two forms.
as a temporary).
2. `deps = msvc` specifies that the tool outputs header dependencies
- in the form produced by Visual Studio's compiler's
+ in the form produced by the Visual Studio compiler's
http://msdn.microsoft.com/en-us/library/hdkef6tk(v=vs.90).aspx[`/showIncludes`
flag]. Briefly, this means the tool outputs specially-formatted lines
to its stdout. Ninja then filters these lines from the displayed
output. No `depfile` attribute is necessary, but the localized string
- in front of the the header file path. For instance
+ in front of the header file path should be globally defined. For instance,
`msvc_deps_prefix = Note: including file:`
- for a English Visual Studio (the default). Should be globally defined.
+ for an English Visual Studio (the default).
+
----
msvc_deps_prefix = Note: including file:
@@ -965,14 +968,14 @@ Fundamentally, command lines behave differently on Unixes and Windows.
On Unixes, commands are arrays of arguments. The Ninja `command`
variable is passed directly to `sh -c`, which is then responsible for
-interpreting that string into an argv array. Therefore the quoting
+interpreting that string into an argv array. Therefore, the quoting
rules are those of the shell, and you can use all the normal shell
operators, like `&&` to chain multiple commands, or `VAR=value cmd` to
set environment variables.
On Windows, commands are strings, so Ninja passes the `command` string
directly to `CreateProcess`. (In the common case of simply executing
-a compiler this means there is less overhead.) Consequently the
+a compiler this means there is less overhead.) Consequently, the
quoting rules are determined by the called program, which on Windows
are usually provided by the C library. If you need shell
interpretation of the command (such as the use of `&&` to chain
@@ -1047,6 +1050,9 @@ relative path, pointing to the same file, are considered different by Ninja.
[[validations]]
Validations
~~~~~~~~~~~
+
+_Available since Ninja 1.11._
+
Validations listed on the build line cause the specified files to be
added to the top level of the build graph (as if they were specified
on the Ninja command line) whenever the build line is a transitive
@@ -1062,7 +1068,7 @@ A build edge can list another build edge as a validation even if the second
edge depends on the first.
Validations are designed to handle rules that perform error checking but
-don't produce any artifacts needed by the build, for example static
+don't produce any artifacts needed by the build, for example, static
analysis tools. Marking the static analysis rule as an implicit input
of the main build rule of the source files or of the rules that depend
on the main build rule would slow down the critical path of the build,
diff --git a/doc/style.css b/doc/style.css
index 9976c03..363e272 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -1,15 +1,22 @@
+:root {
+ color-scheme: light dark;
+}
+
body {
margin: 5ex 10ex;
max-width: 80ex;
line-height: 1.5;
font-family: sans-serif;
}
+
h1, h2, h3 {
font-weight: normal;
}
+
pre, code {
font-family: x, monospace;
}
+
pre {
padding: 1ex;
background: #eee;
@@ -17,13 +24,32 @@ pre {
min-width: 0;
font-size: 90%;
}
+@media (prefers-color-scheme: dark) {
+ pre {
+ background: #333;
+ border: solid 1px #444;
+ }
+}
+
code {
color: #007;
}
+@media (prefers-color-scheme: dark) {
+ code {
+ color: #a7cec8;
+ }
+}
+
div.chapter {
margin-top: 4em;
border-top: solid 2px black;
}
+@media (prefers-color-scheme: dark) {
+ div.chapter {
+ border-top: solid 2px white;
+ }
+}
+
p {
margin-top: 0;
}