Skip to content
Snippets Groups Projects
Commit e18fd940 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Tom Rini
Browse files

MAKEALL: make sure to invoke GNU Make


Since the command name 'make' may not be GNU Make on some platforms
such as FreeBSD, MAKEALL should call scripts/show-gnu-make to get
the command name for GNU MAKE (and error out if it is not found).

The GNU Make should be searched after parsing options because we want
to allow "MAKEALL -h" even if GNU Make is missing on the system.

Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent b68a4062
No related branches found
No related tags found
No related merge requests found
...@@ -162,6 +162,12 @@ while true ; do ...@@ -162,6 +162,12 @@ while true ; do
echo "Internal error!" >&2 ; exit 1 ;; echo "Internal error!" >&2 ; exit 1 ;;
esac esac
done done
GNU_MAKE=$(scripts/show-gnu-make) || {
echo "GNU Make not found" >&2
exit 1
}
# echo "Remaining arguments:" # echo "Remaining arguments:"
# for arg do echo '--> '"\`$arg'" ; done # for arg do echo '--> '"\`$arg'" ; done
...@@ -633,11 +639,11 @@ build_target() { ...@@ -633,11 +639,11 @@ build_target() {
target_arch=$(get_target_arch ${target}) target_arch=$(get_target_arch ${target})
eval cross_toolchain=\$CROSS_COMPILE_`echo $target_arch | tr '[:lower:]' '[:upper:]'` eval cross_toolchain=\$CROSS_COMPILE_`echo $target_arch | tr '[:lower:]' '[:upper:]'`
if [ "${cross_toolchain}" ] ; then if [ "${cross_toolchain}" ] ; then
MAKE="make CROSS_COMPILE=${cross_toolchain}" MAKE="$GNU_MAKE CROSS_COMPILE=${cross_toolchain}"
elif [ "${CROSS_COMPILE}" ] ; then elif [ "${CROSS_COMPILE}" ] ; then
MAKE="make CROSS_COMPILE=${CROSS_COMPILE}" MAKE="$GNU_MAKE CROSS_COMPILE=${CROSS_COMPILE}"
else else
MAKE=make MAKE=$GNU_MAKE
fi fi
if [ "${output_dir}" != "." ] ; then if [ "${output_dir}" != "." ] ; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment