Don't rely on EXEEXT as an env variable, infer it from --host instead

This commit is contained in:
Martin Storsjö committed 2019-11-13 12:59:53 +02:00
1 parent 577400a5f7
commit f1168d3016
4 files changed
+24 -6

No files matched your search

+18 -2
View File
@@ -2,17 +2,33 @@
set -e
if [ $# -lt 1 ]; then
unset HOST
while [ $# -gt 0 ]; do
case "$1" in
--host=*)
HOST="${1#*=}"
;;
*)
PREFIX="$1"
;;
esac
shift
done
if [ -z "$PREFIX" ]; then
echo $0 dir
exit 1
fi
PREFIX="$1"
cd "$PREFIX"
if [ -n "$FULL_LLVM" ]; then
exit 0
fi
if [ -n "$HOST" ]; then
EXEEXT=.exe
fi
case $(uname) in
MINGW*)
EXEEXT=.exe