Better way of using two Xcode versions.
authorAdrian Godoroja <robotive@me.com>
Tue, 31 Jan 2012 14:28:11 +0200
changeset 4631 81dccd57e7d9
parent 4626 8588eb3bf3e6
child 4632 e5bc62906ccf
Better way of using two Xcode versions.
Makefile
--- a/Makefile	Mon Jan 30 22:23:06 2012 +0100
+++ b/Makefile	Tue Jan 31 14:28:11 2012 +0200
@@ -9,18 +9,28 @@
 
 BUILDCONFIGURATION?=$(DEFAULT_BUILDCONFIGURATION)
 
+# Default DevTools
+XCODEBUILD=xcodebuild
+
+# Non-default install of DevTools
+# currently used for Muscovy build machine
+if test -d /Xcode4 ; \
+then XCODEBUILD=/Xcode4/usr/bin/./xcodebuild ; \
+fi
+#
+
 CP=ditto --rsrc
 RM=rm
 
 .PHONY: all adium clean localizable-strings latest test astest install
 
 adium:
-	/Xcode4/usr/bin/./xcodebuild -version
-	/Xcode4/usr/bin/./xcodebuild -project Adium.xcodeproj -configuration $(BUILDCONFIGURATION) CFLAGS="$(ADIUM_CFLAGS)" $(ADIUM_NIGHTLY_FLAGS) build
+	$(XCODEBUILD) -version
+	$(XCODEBUILD) -project Adium.xcodeproj -configuration $(BUILDCONFIGURATION) CFLAGS="$(ADIUM_CFLAGS)" $(ADIUM_NIGHTLY_FLAGS) build
 
 test:
-	/Xcode4/usr/bin/./xcodebuild -version
-	/Xcode4/usr/bin/./xcodebuild -project Adium.xcodeproj -configuration $(BUILDCONFIGURATION) CFLAGS="$(ADIUM_CFLAGS)" $(ADIUM_NIGHTLY_FLAGS) -target "Unit tests" build
+	$(XCODEBUILD) -version
+	$(XCODEBUILD) -project Adium.xcodeproj -configuration $(BUILDCONFIGURATION) CFLAGS="$(ADIUM_CFLAGS)" $(ADIUM_NIGHTLY_FLAGS) -target "Unit tests" build
 astest:
 	osascript unittest\ runner.applescript | tr '\r' '\n'
 
@@ -29,8 +39,8 @@
 	cp -R build/$(BUILDCONFIGURATION)/Adium.app ~/Applications/
 
 clean:
-	/Xcode4/usr/bin/./xcodebuild -version
-	/Xcode4/usr/bin/./xcodebuild -project Adium.xcodeproj -configuration $(BUILDCONFIGURATION) $(ADIUM_NIGHTLY_FLAGS) clean
+	$(XCODEBUILD) -version
+	$(XCODEBUILD) -project Adium.xcodeproj -configuration $(BUILDCONFIGURATION) $(ADIUM_NIGHTLY_FLAGS) clean
 
 localizable-strings:
 	mkdir tmp || true