From 44c0cb3a8d9d06925f370e52f76efab60d4779b4 Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Thu, 25 Jan 2007 22:56:14 +0000 Subject: [PATCH] check for (g)awk --- build-devkit.sh | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/build-devkit.sh b/build-devkit.sh index 9ecb841..6bd0f7e 100644 --- a/build-devkit.sh +++ b/build-devkit.sh @@ -263,6 +263,33 @@ LIBGBA_SRCDIR="libgba-$LIBGBA_VER" LIBNDS_SRCDIR="libnds-$LIBNDS_VER" LIBMIRKO_SRCDIR="libmirko-$LIBMIRKO_VER" + +#--------------------------------------------------------------------------------- +# find proper make +#--------------------------------------------------------------------------------- +if [ -z "$MAKE" -a -x "$(which gnumake)" ]; then MAKE=$(which gnumake); fi +if [ -z "$MAKE" -a -x "$(which gmake)" ]; then MAKE=$(which gmake); fi +if [ -z "$MAKE" -a -x "$(which make)" ]; then MAKE=$(which make); fi +if [ -z "$MAKE" ]; then + echo no make found + exit 1 +fi +echo use $MAKE as make +export MAKE + + +#--------------------------------------------------------------------------------- +# find proper gawk +#--------------------------------------------------------------------------------- +if [ -z "$GAWK" -a -x "$(which gawk)" ]; then GAWK=$(which gawk); fi +if [ -z "$GAWK" -a -x "$(which awk)" ]; then GAWK=$(which awk); fi +if [ -z "$GAWK" ]; then + echo no awk found + exit 1 +fi +echo use $GAWK as gawk +export GAWK + #--------------------------------------------------------------------------------- # Add installed devkit to the path, adjusting path on minsys #--------------------------------------------------------------------------------- @@ -276,22 +303,6 @@ echo 'press return to continue' read dummy - - -#--------------------------------------------------------------------------------- -# find proper make -#--------------------------------------------------------------------------------- - -if [ -z "$MAKE" -a -x "$(which gnumake)" ]; then MAKE=$(which gnumake); fi -if [ -z "$MAKE" -a -x "$(which gmake)" ]; then MAKE=$(which gmake); fi -if [ -z "$MAKE" -a -x "$(which make)" ]; then MAKE=$(which make); fi -if [ -z "$MAKE" ]; then - echo no make found - exit 1 -fi -echo use $MAKE as make -export MAKE - patchdir=$(pwd)/$basedir/patches scriptdir=$(pwd)/$basedir/scripts