summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2012-07-01 16:29:43 +0000
committerTim Angus <tim@ngus.net>2013-01-12 20:46:28 +0000
commitfd0e5e607d86f04bbdac6d22945f1ee92a75f5d3 (patch)
treefad58dd2c00df31cf42092e9876efbcd809e069f
parentba818d148b17cf9c054f06570c00cee8e92fee6d (diff)
Support building on cygwin with cross-make-mingw*.sh (#5405) - patch by q3urt.undead@gmail.com
-rwxr-xr-xcross-make-mingw.sh16
-rwxr-xr-xcross-make-mingw64.sh16
2 files changed, 20 insertions, 12 deletions
diff --git a/cross-make-mingw.sh b/cross-make-mingw.sh
index e4b1b13e..619d9f71 100755
--- a/cross-make-mingw.sh
+++ b/cross-make-mingw.sh
@@ -1,22 +1,26 @@
#!/bin/sh
+# Note: This works in Linux and cygwin
+
CMD_PREFIX="i586-mingw32msvc i686-w64-mingw32";
if [ "X$CC" = "X" ]; then
for check in $CMD_PREFIX; do
full_check="${check}-gcc"
- if [ ! $(which "$full_check") = "" ]; then
- export CC="$full_check"
- fi
+ which "$full_check" > /dev/null 2>&1
+ if [ "$?" = "0" ]; then
+ export CC="$full_check"
+ fi
done
fi
if [ "X$WINDRES" = "X" ]; then
for check in $CMD_PREFIX; do
full_check="${check}-windres"
- if [ ! $(which "$full_check") = "" ]; then
- export WINDRES="$full_check"
- fi
+ which "$full_check" > /dev/null 2>&1
+ if [ "$?" = "0" ]; then
+ export WINDRES="$full_check"
+ fi
done
fi
diff --git a/cross-make-mingw64.sh b/cross-make-mingw64.sh
index d480c266..16c3d5da 100755
--- a/cross-make-mingw64.sh
+++ b/cross-make-mingw64.sh
@@ -1,22 +1,26 @@
#!/bin/sh
+# Note: This works in Linux and cygwin
+
CMD_PREFIX="amd64-mingw32msvc x86_64-w64-mingw32";
if [ "X$CC" = "X" ]; then
for check in $CMD_PREFIX; do
full_check="${check}-gcc"
- if [ ! $(which "$full_check") = "" ]; then
- export CC="$full_check"
- fi
+ which "$full_check" > /dev/null 2>&1
+ if [ "$?" = "0" ]; then
+ export CC="$full_check"
+ fi
done
fi
if [ "X$WINDRES" = "X" ]; then
for check in $CMD_PREFIX; do
full_check="${check}-windres"
- if [ ! $(which "$full_check") = "" ]; then
- export WINDRES="$full_check"
- fi
+ which "$full_check" > /dev/null 2>&1
+ if [ "$?" = "0" ]; then
+ export WINDRES="$full_check"
+ fi
done
fi