This is primarily a bug-fix release, but since samurai is feature complete and I'm happy with it's current state, I decided to call it 1.0.
New features
- The
-d keepdepfile
and-d keeprsp
debugging options are now supported to allow inspection of the generated dependency file and RSP file respectively.
Bug fixes
- Failed jobs weren't releasing their pool slot. This could cause the build to terminate early when pool depth was 1, and the failure limit (
-k
flag) had not yet been reached. - Dependency files containing more than one
output: input
line would have the first character of the output path skipped on subsequent lines. This would result an error since all lines in the dependency file must refer to the same output path. - Empty paths in build edges (e.g. expanded from an undefined variable) were not getting rejected, causing a NUL byte to be written past the end of the allocation for the path string when it was canonicalized as
.
. - Recursive rule variable definitions were not detected and rejected, causing infinite recursion when attempting to expand them.
Cleanups
- Better error message for dependency log read failure, differentiating unexpected EOF from read error.
- Standard output is now line buffered, even when redirected to a pipe or regular file. This allows incremental progress updates in cases where the output is being saved or piped to another command.
- The Makefile now declares dependencies on header files, so that during development, objects get rebuilt when the headers change.
Acknowledgements
Thanks to rehaby and Frederic Cambus for reporting bugs.