0.9.5.41:
[sbcl.git] / find-gnumake.sh
blobdf76c7ee8bc1b8c98dde59384a8bbe57da2fbd28
1 #!/bin/false
2 # Not a shell script, but something intended to be sourced from shell scripts
3 find_gnumake() {
4 # the GNU dialect of "make" -- easier to find or port it than to
5 # try to figure out how to port to the local dialect...
6 if [ "$GNUMAKE" != "" ] ; then
7 # The user is evidently trying to tell us something.
8 GNUMAKE="$GNUMAKE"
9 elif [ -x "`which gmake`" ] ; then
10 # "gmake" is the preferred name in *BSD.
11 GNUMAKE=gmake
12 elif [ -x "`which gnumake`" ] ; then
13 # MacOS X aka Darwin
14 GNUMAKE=gnumake
15 elif [ "GNU Make" = "`make -v | head -n 1 | cut -b 0-8`" ]; then
16 GNUMAKE=make
17 else
18 echo "GNU Make not found. Try setting the environment variable GNUMAKE."
19 exit 1
21 export GNUMAKE
22 #echo "//GNUMAKE=\"$GNUMAKE\""