From 173f13b81f5a2fea144092fc5fffc01cc2aa56d8 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 5 Nov 2004 11:57:00 +0000 Subject: [PATCH] add debug function git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1759 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/abuild/abuild.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/util/abuild/abuild.sh b/util/abuild/abuild.sh index a8f39e46b5..037fa00e1c 100644 --- a/util/abuild/abuild.sh +++ b/util/abuild/abuild.sh @@ -30,6 +30,11 @@ ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \ -e "s/Power Macintosh/ppc/"` +function debug +{ + test "$verbose" == "true" && echo $* +} + function vendors { # make this a function so we can easily select @@ -207,12 +212,10 @@ function build_target if [ "$ARCH" == amd64 -a "$TARCH" == i386 ]; then CC="gcc -m32" found_crosscompiler=true - echo " ($TARCH: subset of $ARCH)" fi if [ "$ARCH" == ppc64 -a "$TARCH" == ppc ]; then CC="gcc -m32" found_crosscompiler=true - echo " ($TARCH: subset of $ARCH)" fi if [ "$found_crosscompiler" == "false" -a "$TARCH" == ppc ] ;then for prefix in powerpc-eabi- powerpc-linux- ; do @@ -232,7 +235,7 @@ function build_target echo return 0 else - echo " ($TARCH: ok)" + echo " ($TARCH: ok, though we're $ARCH)" fi fi @@ -294,6 +297,7 @@ EOF target="" buildall=false LBROOT=$( cd ../..; pwd ) +verbose=false # parse parameters args=`getopt -l version,verbose,help,all,target:,broken Vvhat:b -- "$@"` @@ -320,7 +324,7 @@ done test -z "$1" || LBROOT=$1 -echo "LBROOT=$LBROOT" +debug "LBROOT=$LBROOT" if [ "$target" != "" ]; then # build a single board