From patchwork Tue Jul 22 02:19:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 372337 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 8B1AE140090 for ; Tue, 22 Jul 2014 12:19:32 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BE9E0A7471; Tue, 22 Jul 2014 04:19:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VzWLjatfjYw8; Tue, 22 Jul 2014 04:19:29 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 806F7A7460; Tue, 22 Jul 2014 04:19:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BD607A7466 for ; Tue, 22 Jul 2014 04:19:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AK7-9TLsEbyo for ; Tue, 22 Jul 2014 04:19:20 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id 3CB04A7452 for ; Tue, 22 Jul 2014 04:19:17 +0200 (CEST) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile14) with ESMTP id s6M2JDY4005991; Tue, 22 Jul 2014 11:19:13 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili15) with ESMTP id s6M2JDB20709; Tue, 22 Jul 2014 11:19:13 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi13) id s6M2JD5N032455; Tue, 22 Jul 2014 11:19:13 +0900 Received: from poodle by lomi13.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s6M2JD8m032415; Tue, 22 Jul 2014 11:19:13 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 6832F2740043; Tue, 22 Jul 2014 11:19:13 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 22 Jul 2014 11:19:08 +0900 Message-Id: <1405995549-30489-3-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405995549-30489-1-git-send-email-yamada.m@jp.panasonic.com> References: <1405995549-30489-1-git-send-email-yamada.m@jp.panasonic.com> Cc: Tom Rini , Jeroen Hofstee Subject: [U-Boot] [PATCH v2 2/3] MAKEALL: make sure to invoke GNU Make X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Acked-by: Simon Glass --- Changes in v2: - Check GNU Make only once at startup. It seems more reasonable because MAKEALL generally invokes make over and over again. MAKEALL | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/MAKEALL b/MAKEALL index 37ef71e..9510982 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