Define emake to enable installing on FreeBSD

This commit is contained in:
George Wilson 2019-02-17 09:11:16 +10:00
parent 4c22f6f41f
commit 398d8d7ae0

24
ghcup
View File

@ -453,6 +453,24 @@ edo()
"$@" || exit 2
}
# @FUNCTION: emake
# @USAGE: [arguments]
# @DESCRIPTION:
# Wrapper around 'make', may call 'gmake' if it exists.
emake() { # avoid re-checking for gmake
if [ -n "${MAKE}" ] ; then
edo ${MAKE} "$@"
else
if command_exists gmake ; then
MAKE=gmake
edo ${MAKE} "$@"
else
MAKE=make
edo ${MAKE} "$@"
fi
fi
}
# @FUNCTION: debug_message
# @USAGE: <msg>
# @DESCRIPTION:
@ -1189,7 +1207,7 @@ install_ghc() {
debug_message "Installing GHC into ${inst_location}"
edo ./configure --prefix="${inst_location}"
edo make install
emake install
# clean up
edo cd ..
@ -1545,8 +1563,8 @@ compile_ghc() {
edo ./boot
edo ./configure --prefix="${inst_location}" --with-ghc="${bootstrap_ghc}"
edo make -j${JOBS}
edo make install
emake -j${JOBS}
emake install
# clean up
edo cd ..