Frequently Asked Questions
Why write a build script in C?
Build scripts are C programs and use the same compiler toolchain and debugger as the project. No separate build-language runtime is required.
Is it fast?
Compiles run in parallel. Compiler depfiles track header changes, and stored command lines track flag changes. No-op builds check file metadata. IncludeBuild invokes compilers directly.
Does it support MSVC?
No. IncludeBuild emits GCC-compatible command lines for gcc, clang,
and MinGW. The Windows test suite uses MinGW.
cl.exe is not supported.
How do I add my own flags or verbs to ./build?
Process custom arguments before calling ib_init. See
Custom Arguments in the guide.
Unknown arguments return an error, which catches misspellings such
as ./build releas.
When does an object rebuild?
An object rebuilds when it is missing, a dependency is newer, or its
compile command changed. Links rerun when an input, command, or
library changed.
./build -v prints the reason for every action.
Where do object files go?
Objects, depfiles, and command records are stored in
.ibuild/ by mode and target.
./build clean removes them. Artifacts are written to
the project root unless ib.out_dir is set.
How is this different from nob.h?
nob.h provides process and string-building utilities
for writing custom build logic. IncludeBuild provides targets,
incremental scheduling, parallel compilation, and a command-line
interface. A build.c file declares targets and
sources.
Can I embed it in something bigger?
No. IncludeBuild exits on configuration errors and is designed to own the build process. It is not an embeddable build engine for a long-running application.
What's the license?
CC0 1.0 Universal (public domain). Copy build.h into
anything, commercial or not, no attribution required.