[quake3-commits] r2290 - trunk

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Jul 1 12:29:43 EDT 2012


Author: thilo
Date: 2012-07-01 12:29:43 -0400 (Sun, 01 Jul 2012)
New Revision: 2290

Modified:
   trunk/cross-make-mingw.sh
   trunk/cross-make-mingw64.sh
Log:
Support building on cygwin with cross-make-mingw*.sh (#5405) - patch by q3urt.undead at gmail.com


Modified: trunk/cross-make-mingw.sh
===================================================================
--- trunk/cross-make-mingw.sh	2012-07-01 14:18:31 UTC (rev 2289)
+++ trunk/cross-make-mingw.sh	2012-07-01 16:29:43 UTC (rev 2290)
@@ -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
 

Modified: trunk/cross-make-mingw64.sh
===================================================================
--- trunk/cross-make-mingw64.sh	2012-07-01 14:18:31 UTC (rev 2289)
+++ trunk/cross-make-mingw64.sh	2012-07-01 16:29:43 UTC (rev 2290)
@@ -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
 



More information about the quake3-commits mailing list