Commit a9a90f32 authored by rtoy's avatar rtoy
Browse files

Handle the case where which returns nothing if it can't find the

program, but does set the exit code appropriately.
parent 7df234a8
...@@ -49,7 +49,15 @@ SKIPUTILS=no ...@@ -49,7 +49,15 @@ SKIPUTILS=no
# If gmake exists, assume it is GNU make and use it. # If gmake exists, assume it is GNU make and use it.
if [ -z "$MAKE" ]; then if [ -z "$MAKE" ]; then
MAKE="`which gmake`" MAKE="`which gmake`"
if echo $MAKE | grep '^no' > /dev/null; then
# Some versions of which set an error code if it fails. Others
# say "no foo in <path>". In either of these cases, just assume
# make is GNU make.
if [ $? -ne 0 ]; then
MAKE="make"
fi
if echo "X$MAKE" | grep '^Xno' > /dev/null; then
MAKE="make" MAKE="make"
fi fi
fi fi
...@@ -96,6 +104,7 @@ buildit () ...@@ -96,6 +104,7 @@ buildit ()
if [ "$ENABLE" = "yes" ]; if [ "$ENABLE" = "yes" ];
then then
set -x
$TOOLDIR/clean-target.sh $TARGET $TOOLDIR/clean-target.sh $TARGET
$TIMER $TOOLDIR/build-world.sh $TARGET $OLDLISP $BOOT $TIMER $TOOLDIR/build-world.sh $TARGET $OLDLISP $BOOT
(cd $TARGET/lisp; $MAKE) (cd $TARGET/lisp; $MAKE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment