diff options
-rwxr-xr-x | scripts/genconfig.sh | 1 | ||||
-rwxr-xr-x | scripts/make.sh | 4 | ||||
-rw-r--r-- | scripts/portability.sh | 8 |
3 files changed, 8 insertions, 5 deletions
diff --git a/scripts/genconfig.sh b/scripts/genconfig.sh index c4940dfd..21e6c7b7 100755 --- a/scripts/genconfig.sh +++ b/scripts/genconfig.sh @@ -5,7 +5,6 @@ mkdir -p generated -source configure source scripts/portability.sh probecc() diff --git a/scripts/make.sh b/scripts/make.sh index 58456f6f..2fc94b4c 100755 --- a/scripts/make.sh +++ b/scripts/make.sh @@ -5,12 +5,8 @@ export LANG=c export LC_ALL=C set -o pipefail -source ./configure source scripts/portability.sh -[ ! -z "$CROSS_COMPILE" ] && [ ! -e "$CROSS_COMPILE"cc ] && - echo "missing ${CROSS_COMPILE}cc" && exit 1 - [ -z "$KCONFIG_CONFIG" ] && KCONFIG_CONFIG=.config [ -z "$OUTNAME" ] && OUTNAME=toybox UNSTRIPPED="generated/unstripped/$(basename "$OUTNAME")" diff --git a/scripts/portability.sh b/scripts/portability.sh index fddd84ec..abeb31f2 100644 --- a/scripts/portability.sh +++ b/scripts/portability.sh @@ -1,5 +1,13 @@ # sourced to find alternate names for things +source configure + +if [ -z "$(command -v "${CROSS_COMPILE}${CC}")" ] +then + echo "No ${CROSS_COMPILE}${CC} found" >&2 + exit 1 +fi + if [ -z "$SED" ] then [ ! -z "$(which gsed 2>/dev/null)" ] && SED=gsed || SED=sed |