mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Do not rely on which to be present in the system
For portability, it is better to use the built-in `command` to check the existance of executables in the system.
This commit is contained in:
parent
a61d893a7f
commit
1e226263db
|
|
@ -27,7 +27,7 @@ then
|
||||||
SBCL_HOME=$SBCL_PWD/../../obj/sbcl-home/; export SBCL_HOME
|
SBCL_HOME=$SBCL_PWD/../../obj/sbcl-home/; export SBCL_HOME
|
||||||
SBCL_BUILDING_CONTRIB="please asdf install your hook"; export SBCL_BUILDING_CONTRIB
|
SBCL_BUILDING_CONTRIB="please asdf install your hook"; export SBCL_BUILDING_CONTRIB
|
||||||
else
|
else
|
||||||
SBCLRUNTIME="`which sbcl`"
|
SBCLRUNTIME="`command -v sbcl`"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
SBCLRUNTIME="$1"
|
SBCLRUNTIME="$1"
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ find_gnumake() {
|
||||||
GNUMAKE="$GNUMAKE"
|
GNUMAKE="$GNUMAKE"
|
||||||
elif [ "GNU Make" = "`make -v 2>/dev/null | head -n 1 | cut -b 1-8`" ]; then
|
elif [ "GNU Make" = "`make -v 2>/dev/null | head -n 1 | cut -b 1-8`" ]; then
|
||||||
GNUMAKE=make
|
GNUMAKE=make
|
||||||
elif [ -x "`which gmake`" ] ; then
|
elif [ -x "`command -v gmake`" ] ; then
|
||||||
# "gmake" is the preferred name in *BSD.
|
# "gmake" is the preferred name in *BSD.
|
||||||
GNUMAKE=gmake
|
GNUMAKE=gmake
|
||||||
elif [ -x "`which gnumake`" ] ; then
|
elif [ -x "`command -v gnumake`" ] ; then
|
||||||
# MacOS X aka Darwin
|
# MacOS X aka Darwin
|
||||||
GNUMAKE=gnumake
|
GNUMAKE=gnumake
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
git_available_p() {
|
git_available_p() {
|
||||||
# Check that (1) we have git (2) this is a git tree.
|
# Check that (1) we have git (2) this is a git tree.
|
||||||
if ( which git >/dev/null 2>/dev/null && git describe >/dev/null 2>/dev/null )
|
if ( command -v git >/dev/null && git describe >/dev/null 2>/dev/null )
|
||||||
then
|
then
|
||||||
echo "ok"
|
echo "ok"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ LC_ALL=C
|
||||||
# Just doing CC=${CC:-cc} may be enough, but it needs to be checked
|
# Just doing CC=${CC:-cc} may be enough, but it needs to be checked
|
||||||
# that cc is available on all platforms.
|
# that cc is available on all platforms.
|
||||||
if [ -z $CC ]; then
|
if [ -z $CC ]; then
|
||||||
if [ -x "`which cc`" ]; then
|
if [ -x "`command -v cc`" ]; then
|
||||||
CC=cc
|
CC=cc
|
||||||
else
|
else
|
||||||
CC=gcc
|
CC=gcc
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
platform="${SBCL_SOFTWARE_TYPE}-${SBCL_MACHINE_TYPE}"
|
platform="${SBCL_SOFTWARE_TYPE}-${SBCL_MACHINE_TYPE}"
|
||||||
|
|
||||||
if [ -z $CC ]; then
|
if [ -z $CC ]; then
|
||||||
if [ -x "`which cc`" ]; then
|
if [ -x "`command -v cc`" ]; then
|
||||||
CC=cc
|
CC=cc
|
||||||
else
|
else
|
||||||
CC=gcc
|
CC=gcc
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue