summaryrefslogtreecommitdiff
path: root/MAKEALL
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-07-22 11:19:08 +0900
committerTom Rini <trini@ti.com>2014-07-29 11:48:38 -0400
commite18fd9405cfa60765fdbb85af1b58a02e245ccb8 (patch)
treea715c688182a5f88a79f80d6b0efc4e32e0ea8f6 /MAKEALL
parentb68a4062635cdb21e0904b385fb53fd49ae13432 (diff)
downloadu-boot-imx-e18fd9405cfa60765fdbb85af1b58a02e245ccb8.zip
u-boot-imx-e18fd9405cfa60765fdbb85af1b58a02e245ccb8.tar.gz
u-boot-imx-e18fd9405cfa60765fdbb85af1b58a02e245ccb8.tar.bz2
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: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'MAKEALL')
-rwxr-xr-xMAKEALL12
1 files changed, 9 insertions, 3 deletions
diff --git a/MAKEALL b/MAKEALL
index 020e65f..ed85b7c 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -162,6 +162,12 @@ while true ; do
echo "Internal error!" >&2 ; exit 1 ;;
esac
done
+
+GNU_MAKE=$(scripts/show-gnu-make) || {
+ echo "GNU Make not found" >&2
+ exit 1
+}
+
# echo "Remaining arguments:"
# for arg do echo '--> '"\`$arg'" ; done
@@ -633,11 +639,11 @@ build_target() {
target_arch=$(get_target_arch ${target})
eval cross_toolchain=\$CROSS_COMPILE_`echo $target_arch | tr '[:lower:]' '[:upper:]'`
if [ "${cross_toolchain}" ] ; then
- MAKE="make CROSS_COMPILE=${cross_toolchain}"
+ MAKE="$GNU_MAKE CROSS_COMPILE=${cross_toolchain}"
elif [ "${CROSS_COMPILE}" ] ; then
- MAKE="make CROSS_COMPILE=${CROSS_COMPILE}"
+ MAKE="$GNU_MAKE CROSS_COMPILE=${CROSS_COMPILE}"
else
- MAKE=make
+ MAKE=$GNU_MAKE
fi
if [ "${output_dir}" != "." ] ; then