ninja-compatible build tool written in C
samurai is a ninja-compatible build tool written in C99 with a focus on simplicity, speed, and portability.
samurai implements the ninja build language through version 1.9.0 except
for MSVC dependency handling (deps = msvc). It uses the same format
for .ninja_log and .ninja_deps as ninja, currently version 5 and 4
respectively.
It is feature-complete and supports most of the same options as ninja.
samurai requires various POSIX.1-2008 interfaces.
Scheduling jobs based on load average requires the non-standard
getloadavg function. This feature can be enabled by defining
HAVE_GETLOADAVG in your CFLAGS, along with any other necessary
definitions for your platform.
Spawning subprocesses is done using posix_spawn. If this interface
isn't available on your operating system, define NO_POSIX_SPAWN
in your CFLAGS to use fork and exec instead.
samurai uses clock_gettime, which requires -l rt when linking
on some operating systems to ensure that this interface is made
available. While it is a POSIX requirement to support this flag
(even if it's a no-op), some operating systems don't. If you get
an error about a missing rt library, you can build without it
by clearing LDLIBS.
samurai can be built with make. CFLAGS and LDLIBS can be set
in the environment, or straight on the command-line.
samurai tries to match ninja behavior as much as possible, but there are several cases where it is slightly different:
std::set),
so the first to execute depends on the address returned by malloc.
This may result in build failures due to insufficiently specified
dependencies in the project's build system.-fdiagnostics-color=always, so if you plan to save the output to a
log, you should pass -Db_colorout=auto to meson.No open issues yet, or sync has not completed.