From 66e93355d1b91ace4a1acdf883606e7af96069d0 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 16 Jun 2015 22:38:23 +0200 Subject: buildgcc: Check for dependencies after printing banner For consistency in user output, move the check for all required utilities after printing the banner and parsing options. Change-Id: I5bf31368885c73e35f18b02d53d099f3f3871acc Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/10566 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi Reviewed-by: Paul Menzel --- util/crossgcc/buildgcc | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'util') diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 0c6193d517..c27d62cd7f 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -174,21 +174,6 @@ searchtool() false } -TAR=$(searchtool tar) || exit $? -PATCH=$(searchtool patch) || exit $? -MAKE=$(searchtool make) || exit $? -SHA1SUM=$(searchtool sha1sum) -SHA512SUM=$(searchtool sha512sum) -CHECKSUM=$SHA1SUM - -searchtool m4 > /dev/null -searchtool bison > /dev/null -searchtool flex flex > /dev/null -searchtool g++ "Free Software Foundation" nofail > /dev/null || \ -searchtool clang "clang version" > /dev/null -searchtool wget > /dev/null -searchtool bzip2 "bzip2," > /dev/null - download() { package=$1 archive="$(eval echo \$$package"_ARCHIVE")" @@ -577,6 +562,23 @@ case "$PACKAGE" in ;; esac +# Find all the required tools: + +TAR=$(searchtool tar) || exit $? +PATCH=$(searchtool patch) || exit $? +MAKE=$(searchtool make) || exit $? +SHA1SUM=$(searchtool sha1sum) +SHA512SUM=$(searchtool sha512sum) +CHECKSUM=$SHA1SUM + +searchtool m4 > /dev/null +searchtool bison > /dev/null +searchtool flex flex > /dev/null +searchtool g++ "Free Software Foundation" nofail > /dev/null || \ +searchtool clang "clang version" > /dev/null +searchtool wget > /dev/null +searchtool bzip2 "bzip2," > /dev/null + # This initial cleanup is useful when updating the toolchain script. if [ "$clean" = "1" ]; then -- cgit v1.2.3