shake

minimal build system that generates Ninja build files

git clone https://9o.is/git/shake.git

commit c87d012703f394e9c132c835eaff57cc79f805df
parent 8a087e948a79305b3aeba8b1bfefc69bd93a9d21
Author: Jul <jul@9o.is>
Date:   Fri, 13 Mar 2026 12:54:54 +0800

use - and -- for build dependencies

Diffstat:
Mexample/nested/bin/Shakefile | 2+-
Mshake | 2+-
Mshakeout.awk | 6+++---
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/example/nested/bin/Shakefile b/example/nested/bin/Shakefile @@ -2,7 +2,7 @@ var CFLAGS $CFLAGS -I $LIBDIR -cc main.o: main.c '|' $LIBDIR/lib.h +cc main.o: main.c - $LIBDIR/lib.h link hello: main.o $LIBDIR/lib.a default hello diff --git a/shake b/shake @@ -59,7 +59,7 @@ while [ $# -gt 0 ]; do done fini_gen() { - gen $GEN_OUTS: '|' $GEN_FILES + gen $GEN_OUTS: - $GEN_FILES phony ninja $NINJA_FILES wait } diff --git a/shakeout.awk b/shakeout.awk @@ -26,7 +26,7 @@ function print_tail(start, i) { } function process(cmd, str) { - while (match(str, /(:|\|\||\||[ \t]+)/)) { + while (match(str, /(:|--|-|[ \t]+)/)) { tok = substr(str, 1, RSTART - 1) sep = substr(str, RSTART, RLENGTH) @@ -55,12 +55,12 @@ function process(cmd, str) { bouts = "" } - else if (sep ~ /\|\|/ && state != "BORD") { + else if (sep ~ /--/ && state != "BORD") { printf " ||" state = "BORD" } - else if (sep ~ /\|/ && state != "BDEP") { + else if (sep ~ /-/ && state != "BDEP") { printf " |" state = "BDEP" }