1
0
Fork
You've already forked shinobi
0
forked from derivelinux/shinobi
makefile compiler
  • C 82.3%
  • Go 14.6%
  • Shell 2.3%
  • Makefile 0.8%
xplshn 772ae7f59b Gating mechanism
Signed-off-by: xplshn <anto@xplshn.com.ar>
2026年05月17日 15:52:06 -03:00
backends normalize recipe bodies before emission 2026年05月15日 18:03:20 +00:00
cli Gating mechanism 2026年05月17日 15:52:06 -03:00
doc add manpage, rename compcmd to compdb 2026年05月14日 13:20:23 +00:00
src Gating mechanism 2026年05月17日 15:52:06 -03:00
tests handle glob include 2026年05月16日 19:01:22 +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 Gating mechanism 2026年05月17日 15:52:06 -03:00
README.md readme 2026年05月14日 12:49:31 +00:00
TODO update todos 2026年05月14日 15:22:32 +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.