diff --git a/justfile b/justfile index c5fe35c..16a5b19 100644 --- a/justfile +++ b/justfile @@ -103,3 +103,16 @@ view: build modules # Time the native build (cold / warm / one-file edit), tcc vs system cc, on a temp copy: `just bench 5` or `just bench 3 "tcc cc cc-release"`. bench runs="3" configs="tcc cc": tcc-build scripts/bench-build.sh {{runs}} "{{configs}}" + +# Delete build output (compiled compositor, wasm modules, rendered frames) but keep the built tinycc in _build/tcc. +clean: + #!/usr/bin/env bash + set -euo pipefail + rm -rf build + [ -d _build ] && find _build -mindepth 1 -maxdepth 1 ! -name tcc -exec rm -rf {} + || true + echo "cleaned build/ and _build/ (kept _build/tcc; \`just clean-all\` removes that too)" + +# Delete all build output, including the built tinycc (the next build recompiles it). +clean-all: + rm -rf _build build +