mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-09 23:16:41 -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_BUILDING_CONTRIB="please asdf install your hook"; export SBCL_BUILDING_CONTRIB
|
||||
else
|
||||
SBCLRUNTIME="`which sbcl`"
|
||||
SBCLRUNTIME="`command -v sbcl`"
|
||||
fi
|
||||
else
|
||||
SBCLRUNTIME="$1"
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ find_gnumake() {
|
|||
GNUMAKE="$GNUMAKE"
|
||||
elif [ "GNU Make" = "`make -v 2>/dev/null | head -n 1 | cut -b 1-8`" ]; then
|
||||
GNUMAKE=make
|
||||
elif [ -x "`which gmake`" ] ; then
|
||||
elif [ -x "`command -v gmake`" ] ; then
|
||||
# "gmake" is the preferred name in *BSD.
|
||||
GNUMAKE=gmake
|
||||
elif [ -x "`which gnumake`" ] ; then
|
||||
elif [ -x "`command -v gnumake`" ] ; then
|
||||
# MacOS X aka Darwin
|
||||
GNUMAKE=gnumake
|
||||
else
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
git_available_p() {
|
||||
# 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
|
||||
echo "ok"
|
||||
else
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ LC_ALL=C
|
|||
# Just doing CC=${CC:-cc} may be enough, but it needs to be checked
|
||||
# that cc is available on all platforms.
|
||||
if [ -z $CC ]; then
|
||||
if [ -x "`which cc`" ]; then
|
||||
if [ -x "`command -v cc`" ]; then
|
||||
CC=cc
|
||||
else
|
||||
CC=gcc
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
platform="${SBCL_SOFTWARE_TYPE}-${SBCL_MACHINE_TYPE}"
|
||||
|
||||
if [ -z $CC ]; then
|
||||
if [ -x "`which cc`" ]; then
|
||||
if [ -x "`command -v cc`" ]; then
|
||||
CC=cc
|
||||
else
|
||||
CC=gcc
|
||||
|
|
|
|||
Loading…
Reference in a new issue