From a18f547b44fdf386643be0caf0418adf401b6e72 Mon Sep 17 00:00:00 2001 From: Siva Mahadevan Date: Sun, 13 Oct 2024 21:46:49 -0400 Subject: [PATCH] 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. --- build/build | 2 +- makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/build b/build/build index 1ad1fa5c..a897712b 100755 --- a/build/build +++ b/build/build @@ -3,7 +3,7 @@ DIR="$(dirname $0)" PREV_BQN="$DIR/obj2/for_build4" if [ ! -f "$PREV_BQN" ]; then TMP_BQN="$DIR/obj2/for_build_tmp" - if make -C "$DIR/.." for-build OUTPUT="$TMP_BQN"; then + if "${MAKE:-make}" -C "$DIR/.." for-build OUTPUT="$TMP_BQN"; then if [ "4" = "$("$TMP_BQN" -p "2+2")" ]; then true else diff --git a/makefile b/makefile index 4c33448f..4a129d89 100644 --- a/makefile +++ b/makefile @@ -83,7 +83,7 @@ endif ifeq ($(origin clean),command line) @echo "Error: build-specific 'clean' unsupported"; false endif - @build/build from-makefile CC="$(CC)" CXX="$(CXX)" PIE="$(ENABLE_PIE)" OUTPUT="$(OUTPUT)" j="$(j)" \ + @MAKE="$(MAKE)" build/build from-makefile CC="$(CC)" CXX="$(CXX)" PIE="$(ENABLE_PIE)" OUTPUT="$(OUTPUT)" j="$(j)" \ verbose="$(verbose)" notui="$(notui)" v="$(version)" stored-warn="$(stored-warn)" \ f="$(f)" lf="$(lf)" CCFLAGS="$(CCFLAGS)" LDFLAGS="$(LDFLAGS)" REPLXX_FLAGS="$(REPLXX_FLAGS)" CXXFLAGS="$(CXXFLAGS)" \ LD_LIBS="$(LD_LIBS)" NO_LDL="$(NO_LDL)" no_fPIC="$(no_fPIC)" target-from-cc="$(target_from_cc)" \