SAMU(1)

NAME
samu - ninja-compatible build tool

SYNOPSIS
samu [-C dir] [-d debugflag] [-f buildfile] [-j maxjobs] [-k maxfail] [-w warnflag=action] [-v] [target...]
samu [-C dir] [-f buildfile] -t clean [-gr] [target...]

DESCRIPTION
samu loads a build manifest from buildfile and rebuilds targets if they are out of date. If no targets are specified, the manifest's default targets are built. If there are no default targets, the leaf nodes of the dependency graph are built (outputs that have no consuming action).

Targets are out of date if they are older than the generating action's newest input, they have no entry in the build log, or if the command to build the target differs from what was used previously. Targets built with generator rules are not rebuilt if the command changes.

If the clean tool is used, the targets are cleaned instead. When a target is cleaned, it is removed and are all of its inputs are cleaned. Targets with no generating actions are never removed. Targets built with generator rules are only removed if -g is specified.

OPTIONS

-C  Switch working directory to dir before building.

-d  Enable debug output. If debugflag is explain, print messages explaining why outputs were dirty.

-f  Load manifest from buildfile instead of build.ninja.

-j  Run up to maxjobs jobs in parallel (default based on number of CPUs). If zero, allow unlimited concurrent jobs.

-k  Allow up to maxfail job failures. If negative or zero, allow any number of job failures.

-v  Print full commands instead of just description.

-w  Control how certain errors are handled. If warnflag is dupbuild, action specifies what to do if an output is listed in multiple build edges. If action is err, treat it like an error and fail. If action is warn, only print a diagnostic message.

-t  Instead of building, invoke a subtool. All arguments and flags after the subtool are interpreted by the subtool. Currently, clean is the only subtool.

-g  When cleaning, also clean outputs of generator actions.

-r  targets are interpreted as rules, and all outputs of actions with the specified rule types will be cleaned instead.

SEE ALSO
make(1)