From a84a99b9948fa431bbcadf39f5216b04b3eb1d52 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Tue, 26 May 2009 14:03:51 +0000 Subject: Various fixes to the tree to get coreboot-v2 to build on Solaris - Replace $(PWD) with $(CURDIR) in Makefiles. I don't know why the Solaris version behaves differently, but CURDIR is a safe choice on gnu make (and we require gnu make already) - Use tail -1 instead of tail -n1 in a file that already relies on tail -1 support in another place - Use tail -1 as alternative to tail -n1 in another place - Use #define for ulong_t in romcc, as that name is used on Solaris - Avoid fprinting a null pointer. The standard doesn't mandate that this is a special case, and Solaris doesn't implement it that way. Signed-off-by: Patrick Georgi Acked-by: Ronald G. Minnich git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4305 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/abuild/abuild | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'util/abuild') diff --git a/util/abuild/abuild b/util/abuild/abuild index f8e8196232..5f6120faa8 100755 --- a/util/abuild/abuild +++ b/util/abuild/abuild @@ -36,7 +36,14 @@ cpus=1 configureonly=0 # One might want to adjust these in case of cross compiling -MAKE="make" +for i in make gmake gnumake nonexistant_make; do + $i --version 2>/dev/null |grep "GNU Make" >/dev/null && break +done +if [ "$i" = "nonexistant_make" ]; then + echo No GNU Make found. + exit 1 +fi +MAKE=$i PYTHON=python # this can be changed to xml by -x @@ -202,10 +209,11 @@ EOF LOGLEVEL2="" fi - if [ "`which lzma`" != "" -a "$PAYLOAD" != /dev/null ]; then - COMPRESSION="option CONFIG_COMPRESSED_PAYLOAD_LZMA=1" - else - COMPRESSION="# no compression" + COMPRESSION="# no compression" + if which lzma >/dev/null 2>/dev/null; then + if [ "$PAYLOAD" != /dev/null ]; then + COMPRESSION="option CONFIG_COMPRESSED_PAYLOAD_LZMA=1" + fi fi cp $TARGET/Config-${VENDOR}_${MAINBOARD}.lb $TARGET/Config-${VENDOR}_${MAINBOARD}.lb.pre @@ -266,7 +274,7 @@ function create_builddir xmlfile $build_dir/config.log xml " " xml "" - tail -n $CONTEXT $build_dir/config.log + tail -n $CONTEXT $build_dir/config.log 2> /dev/null || tail -$CONTEXT $build_dir/config.log return 1 fi } @@ -315,7 +323,7 @@ function compile_target xml " " printf "FAILED after ${duration}s! Log excerpt:\n" - tail -n $CONTEXT make.log + tail -n $CONTEXT make.log 2> /dev/null || tail -$CONTEXT make.log cd $CURR return 1 fi -- cgit v1.2.3