- C 82.3%
- Go 14.6%
- Shell 2.3%
- Makefile 0.8%
|
|
||
|---|---|---|
| backends | normalize recipe bodies before emission | |
| cli | Gating mechanism | |
| doc | add manpage, rename compcmd to compdb | |
| src | Gating mechanism | |
| tests | handle glob include | |
| .clang-format | initial | |
| .gitignore | handle :::= properly. stop translating automatic variables in the backend | |
| COPYING | new fast parallel test runner in go + kati/pdpmake test suites | |
| Makefile | Gating mechanism | |
| README.md | readme | |
| TODO | update todos | |
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.