Allow user to override MAKE command used by toolchain and openocd build.

On macOS, "gnumake" and "make" are both supplied by the OS, but are too
old to build glibc (both are version 3.81 as of this writing). Homebrew
provides the "gmake" executable, which is recent enough for glibc.
However, the existing logic in "scripts/build-util.sh" will always
prefer "gnumake" over "gmake".

The configure logic in the riscv-glibc library allows a user to override
the preference for "gnumake" by setting the MAKE environment variable.
This change makes "scripts/build-openocd.sh" and
"scripts/build-toolchains.sh" mimic that behavior. A user can now use
"gmake" instead of "gnumake" during the toolchain build like so:

    MAKE=gmake ./scripts/build-toolchains.sh
This commit is contained in:
Tynan McAuley
2020-03-12 15:29:01 +02:00
parent f517070432
commit 72dfbfabd4

View File

@@ -14,7 +14,8 @@ case ${ncpu} in
*) export MAKEFLAGS="-j ${ncpu} ${MAKEFLAGS}" ;;
esac
MAKE=$(command -v gnumake || command -v gmake || command -v make)
# Allow user to override MAKE
[ -n "${MAKE}" ] || MAKE=$(command -v gnumake || command -v gmake || command -v make)
readonly MAKE