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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user