shake

minimal build system that generates Ninja build files

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

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

ignore build output dups

Diffstat:
Mshakeout.awk | 17+++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/shakeout.awk b/shakeout.awk @@ -34,25 +34,35 @@ function process(cmd, str) { if (state == "BRUL") { brule = tok state = "BOUT" + } else if(state == "BOUT") { + if (outputs[tok] == 1) { + brule = "" + bouts = "" + state = "" + return + } + bouts = bouts " " add_prefix(tok) + outputs[tok] = 1 } else { printf " %s", add_prefix(tok) } } if (sep ~ /:/) { + printf "build %s: %s", bouts, brule state = "BIN" - printf ": %s", brule brule = "" + bouts = "" } else if (sep ~ /\|\|/ && state != "BORD") { - state = "BORD" printf " ||" + state = "BORD" } else if (sep ~ /\|/ && state != "BDEP") { - state = "BDEP" printf " |" + state = "BDEP" } str = substr(str, RSTART + RLENGTH) @@ -63,7 +73,6 @@ function process(cmd, str) { /^shake\+build / { reset("BRUL") - printf "build" process("shake+build", $0) next }