From b313d863fa8046f9a23c99a4be28e03b5edcf963 Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 9 Sep 2011 20:21:29 -0700 Subject: [PATCH] Sniff for the MAKE env properly --- scripts/install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 4c0c030d8ce8b..46aec9fe7cbd2 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -88,8 +88,6 @@ fi # otherwise, try to find gmake, and then make. # If no make is found, then just execute the necessary commands. if [ "x$MAKE" = "x" ]; then - make="$MAKE" -else make=`which gmake 2>&1` if [ $? -eq 0 ] && [ -x $make ]; then (exit 0) @@ -101,8 +99,11 @@ else make=NOMAKE fi fi +else + make="$MAKE" fi -if [ -x $make ]; then + +if [ -x "$make" ]; then (exit 0) else echo "Installing without make. This may fail." >&2 @@ -196,7 +197,7 @@ cd "$TMP" \ fi) \ && (if [ "$make" = "NOMAKE" ]; then (exit 0) - elif $make clean install; then + elif "$make" clean install; then (exit 0) else make="NOMAKE"