Adding fix to test runner to support bsd by running gmake explicitly.
h3rald h3rald@h3rald.com
Mon, 03 Aug 2026 17:54:14 +0200
1 files changed,
13 insertions(+),
3 deletions(-)
jump to
M
test.sh
→
test.sh
@@ -41,10 +41,20 @@ [[ -f "$path" ]] || fail "Missing file: $path"
} build_xyw() { - if command -v make >/dev/null 2>&1; then - (cd "$ROOT_DIR" && make xyw) + # The Makefile relies on GNU make extensions (ifeq, :=, $(shell ...)), + # which BSD make (e.g. NetBSD/FreeBSD's default `make`) cannot parse, + # use "gmake" if available to force GNU make if available + local make_cmd="" + if command -v gmake >/dev/null 2>&1; then + make_cmd="gmake" + elif command -v make >/dev/null 2>&1; then + make_cmd="make" + fi + + if [[ -n "$make_cmd" ]]; then + (cd "$ROOT_DIR" && "$make_cmd" xyw) else - echo "WARN: 'make' not found; using existing xyw binary if present." >&2 + echo "WARN: 'make'/'gmake' not found; using existing xyw binary if present." >&2 fi }