[quake3-commits] r2397 - trunk

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Jan 1 13:41:26 EST 2013


Author: ra
Date: 2013-01-01 13:41:25 -0500 (Tue, 01 Jan 2013)
New Revision: 2397

Modified:
   trunk/make-macosx.sh
Log:
Have make-macosx.sh require the user to specify which architecture she/he wants to build for and suggest building UB's if the user is unaware of what architectures are

Modified: trunk/make-macosx.sh
===================================================================
--- trunk/make-macosx.sh	2012-12-31 01:32:15 UTC (rev 2396)
+++ trunk/make-macosx.sh	2013-01-01 18:41:25 UTC (rev 2397)
@@ -1,7 +1,5 @@
 #!/bin/sh
 #
-# BUILDARCH can be set to either i386, x86_64 or ppc
-BUILDARCH=x86_64
 
 CC=gcc-4.0
 APPBUNDLE=ioquake3.app
@@ -13,6 +11,28 @@
 BASEDIR=baseq3
 MPACKDIR=missionpack
 
+# Lets make the user give us a target build system
+
+if [ $# -ne 1 ]; then
+	echo "Usage:   $0 target_architecture"
+	echo "Example: $0 i386"
+	echo
+	echo "If you don't know or care about architectures please consider using make-macosx-ub.sh instead of this script."
+	exit 1
+fi
+
+if [ "$1" == "i386" ]; then
+	BUILDARCH=i386
+elif [ "$1" == "x86_64" ]; then
+	BUILDARCH=x86_64
+elif [ "$1" == "ppc" ]; then
+	BUILDARCH=ppc
+else
+	echo "Invalid architecture: $1"
+	echo "Valid architectures are i386, x86_64 or ppc"
+	exit 1
+fi
+
 BIN_OBJ="
 	build/release-darwin-${BUILDARCH}/ioquake3.${BUILDARCH}
 "



More information about the quake3-commits mailing list