4
11
Fork
You've already forked shinobi
4
makefile compiler
  • C 82.8%
  • Go 13.4%
  • Shell 2.1%
  • Makefile 1.7%
2026年07月05日 22:59:05 +00:00
backends escape properly (fixes kati/recipe_var test) 2026年07月05日 22:38:56 +00:00
cli handle multiple conflicting submake branches by picking the wanted branch in cases where there is a conflict 2026年07月03日 14:01:55 +00:00
doc update manpage; fix function error message when not in gnu mode 2026年05月18日 17:55:52 +00:00
src remove extraenous warnings (should make linter mode for things like this?) 2026年07月05日 22:59:05 +00:00
tests handle multiple conflicting submake branches by picking the wanted branch in cases where there is a conflict 2026年07月03日 14:01:55 +00:00
.clang-format initial 2026年04月07日 16:18:28 +00:00
.gitignore handle :::= properly. stop translating automatic variables in the backend 2026年05月14日 12:12:24 +00:00
COPYING new fast parallel test runner in go + kati/pdpmake test suites 2026年05月13日 22:36:51 +00:00
Makefile autogen proper deps in makefile 2026年06月30日 16:07:03 +00:00
README.md readme 2026年05月14日 12:49:31 +00:00
TODO Update TODO 2026年05月18日 11:27:04 +02:00

shinobi

shinobi is a compiler for makefiles. it parses using a line-oriented parser, expands and evaluates, and generates a static build graph of targets and dependencies. the graph can then be used to emit some backend. right now there is three backends, ninja for actually building stuff, graphviz dot for vizualisation, and compile_commands.json which is helpful for clang tooling.

the end goal is to be 99% compatible with both posix and gnu style makefiles. right now this is mostly true; only a majority of make features and grammar is supported, enough to parse quite a lot of makefiles. complex make-based build systems like the linux kernel's Kbuild still have a way to go.

if you want to help out, there's lots to do. feel free to make a contibution. some high-priority tasks are listed in the TODO file.

it is implemented in C99. it is also extensively tested against an extremely large test suite, which includes tests from multiple projects, including the entire gnu make test suite, some from kati, and all of pdpmake's test. overall, this is 4200+ tests. you can read more about that in 'tests/readme'.

you can build and install shinobi like so:

make
make install 

this is public domain software. the primary repository is located at https://codeberg.org/derivelinux/shinobi there is a mirror at https://git.sr.ht/~shrub900/shinobi , although it may sometimes be slightly behind.