uCBQN/build/build
Siva Mahadevan a18f547b44 build: fix on systems with bmake as make impl
For example, on FreeBSD, bmake is the default make implementation. Thus, to
build CBQN, we must use 'gmake' invocations. This patch fixes the hardcoded call
to 'make' in build/build.
2024-10-13 21:46:52 -04:00

22 lines
625 B
Bash
Executable File

#!/usr/bin/env sh
DIR="$(dirname $0)"
PREV_BQN="$DIR/obj2/for_build4"
if [ ! -f "$PREV_BQN" ]; then
TMP_BQN="$DIR/obj2/for_build_tmp"
if "${MAKE:-make}" -C "$DIR/.." for-build OUTPUT="$TMP_BQN"; then
if [ "4" = "$("$TMP_BQN" -p "2+2")" ]; then
true
else
echo "automatically-built bootstrap CBQN doesn't behave as expected; run 'make for-build' with necessary configuration manually"
exit 1
fi
else
echo "failed to build bootstrap CBQN; run 'make for-build' with necessary configuration manually"
exit 1
fi
mv "$TMP_BQN" "$PREV_BQN"
fi
"$PREV_BQN" "$DIR/src/build.bqn" "$@"