File: find-gnumake.sh

package info (click to toggle)
sbcl 2%3A2.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 41,036 kB
  • sloc: lisp: 436,701; ansic: 31,041; sh: 4,471; asm: 2,604; makefile: 265; cpp: 27
file content (23 lines) | stat: -rw-r--r-- 788 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/false
# Not a shell script, but something intended to be sourced from shell scripts
find_gnumake() {
  # the GNU dialect of "make" -- easier to find or port it than to
  # try to figure out how to port to the local dialect...
  if [ "$GNUMAKE" != "" ] ; then
    # The user is evidently trying to tell us something.
    GNUMAKE="$GNUMAKE"
  elif [ "GNU Make" = "`make -v 2>/dev/null | head -n 1 | cut -b 1-8`" ]; then
    GNUMAKE=make
  elif [ -x "`command -v gmake`" ] ; then
    # "gmake" is the preferred name in *BSD.
    GNUMAKE=gmake
  elif [ -x "`command -v gnumake`" ] ; then
    # MacOS X aka Darwin
    GNUMAKE=gnumake
  else
    echo "GNU Make not found. Try setting the environment variable GNUMAKE."
    exit 1
  fi
  export GNUMAKE
  #echo "//GNUMAKE=\"$GNUMAKE\""
}