1
0
Fork
You've already forked shinobi
0
forked from derivelinux/shinobi
makefile compiler
  • C 83.3%
  • Go 13.8%
  • Shell 2.2%
  • Makefile 0.7%
2026年06月12日 22:05:30 +00:00
backends avoid rebuilding clean pre eixsting outputs on first run in ninja backend 2026年06月12日 22:05:30 +00:00
cli pattern rules, static pattern rules, and some export things 2026年05月25日 13:40:46 +00:00
doc update manpage; fix function error message when not in gnu mode 2026年05月18日 17:55:52 +00:00
src fix subgraph target with no recipe emission and fix pattern/suffix rule precendence, add new test 2026年05月30日 12:29:33 +00:00
tests avoid rebuilding clean pre eixsting outputs on first run in ninja backend 2026年06月12日 22:05:30 +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 move implcit rules and var seeding to a new file; make default vars more posix compliant 2026年05月18日 18:12:53 +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.