Skip to content

ninja

ninja documentation

toolroom._stubs.ninja.Ninja

Bases: Tool[_R]

__call__

__call__(
    *args: str | PathLike[str],
    C: Value = ...,
    d: Value = ...,
    f: Value = ...,
    j: Value = ...,
    k: Value = ...,
    l: Value = ...,
    n: Flag = ...,
    quiet: Flag = ...,
    t: Value = ...,
    verbose: Flag = ...,
    w: Value = ...,
    **flags: Any,
) -> _R

if targets are unspecified, builds the 'default' target (see manual).

Parameters:

Name Type Description Default
C Value

change to DIR before doing anything else.

...
d Value

enable debugging (use '-d list' to list modes).

...
f Value

specify input build file [default=build.ninja].

...
j Value

run N jobs in parallel (0 means infinity) [default=6 on this system].

...
k Value

keep going until N jobs fail (0 means infinity) [default=1].

...
l Value

do not start new jobs if the load average is greater than N.

...
n Flag

dry run (don't run commands but act like they succeeded).

...
quiet Flag

don't show progress status, just command output. Added in 1.11.1.

...
t Value

run a subtool (use '-t list' to list subtools) terminates toplevel options; further flags are passed to the tool.

...
verbose Flag

show all command lines while building.

...
w Value

adjust warnings (use '-w list' to list warnings).

...