add debug function

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1759 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer 2004-11-05 11:57:00 +00:00
parent d4c6846f41
commit 173f13b81f
1 changed files with 8 additions and 4 deletions

View File

@ -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/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \
-e "s/Power Macintosh/ppc/"` -e "s/Power Macintosh/ppc/"`
function debug
{
test "$verbose" == "true" && echo $*
}
function vendors function vendors
{ {
# make this a function so we can easily select # make this a function so we can easily select
@ -207,12 +212,10 @@ function build_target
if [ "$ARCH" == amd64 -a "$TARCH" == i386 ]; then if [ "$ARCH" == amd64 -a "$TARCH" == i386 ]; then
CC="gcc -m32" CC="gcc -m32"
found_crosscompiler=true found_crosscompiler=true
echo " ($TARCH: subset of $ARCH)"
fi fi
if [ "$ARCH" == ppc64 -a "$TARCH" == ppc ]; then if [ "$ARCH" == ppc64 -a "$TARCH" == ppc ]; then
CC="gcc -m32" CC="gcc -m32"
found_crosscompiler=true found_crosscompiler=true
echo " ($TARCH: subset of $ARCH)"
fi fi
if [ "$found_crosscompiler" == "false" -a "$TARCH" == ppc ] ;then if [ "$found_crosscompiler" == "false" -a "$TARCH" == ppc ] ;then
for prefix in powerpc-eabi- powerpc-linux- ; do for prefix in powerpc-eabi- powerpc-linux- ; do
@ -232,7 +235,7 @@ function build_target
echo echo
return 0 return 0
else else
echo " ($TARCH: ok)" echo " ($TARCH: ok, though we're $ARCH)"
fi fi
fi fi
@ -294,6 +297,7 @@ EOF
target="" target=""
buildall=false buildall=false
LBROOT=$( cd ../..; pwd ) LBROOT=$( cd ../..; pwd )
verbose=false
# parse parameters # parse parameters
args=`getopt -l version,verbose,help,all,target:,broken Vvhat:b -- "$@"` args=`getopt -l version,verbose,help,all,target:,broken Vvhat:b -- "$@"`
@ -320,7 +324,7 @@ done
test -z "$1" || LBROOT=$1 test -z "$1" || LBROOT=$1
echo "LBROOT=$LBROOT" debug "LBROOT=$LBROOT"
if [ "$target" != "" ]; then if [ "$target" != "" ]; then
# build a single board # build a single board