Bug 641232 - Make HAS_XCODE_2_1 detection compatible with Xcode 4; r=Standard8
authorRafael Avila de Espindola <respindola@mozilla.com>
Mon, 04 Jul 2011 10:52:28 +0100
changeset 8256 ec4f54ab8cf3dee2a61f9cdf4dec31f08269c7b8
parent 8255 9f8456bb68f62ef592232675115eb121ffd14188
child 8257 1f367f35734935abcfbf6507e516822cd1fa6d30
push idunknown
push userunknown
push dateunknown
reviewersStandard8
bugs641232
Bug 641232 - Make HAS_XCODE_2_1 detection compatible with Xcode 4; r=Standard8
config/autoconf.mk.in
config/config.mk
configure.in
mail/components/search/mdimporter/Makefile.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -520,18 +520,16 @@ MOZ_SUITE	= @MOZ_SUITE@
 WINCE		= @WINCE@
 WINCE_WINDOWS_MOBILE = @WINCE_WINDOWS_MOBILE@
 
 MOZ_DISTRIBUTION_ID = @MOZ_DISTRIBUTION_ID@
 
 MACOS_SDK_DIR	= @MACOS_SDK_DIR@
 NEXT_ROOT	= @NEXT_ROOT@
 GCC_VERSION	= @GCC_VERSION@
-XCODEBUILD_VERSION= @XCODEBUILD_VERSION@
-HAS_XCODE_2_1	= @HAS_XCODE_2_1@
 UNIVERSAL_BINARY= @UNIVERSAL_BINARY@
 HAVE_DTRACE= @HAVE_DTRACE@
 
 VISIBILITY_FLAGS = @VISIBILITY_FLAGS@
 
 MOZ_OFFICIAL_BRANDING = @MOZ_OFFICIAL_BRANDING@
 
 JS_SHARED_LIBRARY = @JS_SHARED_LIBRARY@
--- a/config/config.mk
+++ b/config/config.mk
@@ -540,23 +540,16 @@ export MACOSX_DEPLOYMENT_TARGET
 PBBUILD_SETTINGS += MACOSX_DEPLOYMENT_TARGET="$(MACOSX_DEPLOYMENT_TARGET)"
 endif # MACOSX_DEPLOYMENT_TARGET
 ifdef MOZ_OPTIMIZE
 ifeq (2,$(MOZ_OPTIMIZE))
 # Only override project defaults if the config specified explicit settings
 PBBUILD_SETTINGS += GCC_MODEL_TUNING= OPTIMIZATION_CFLAGS="$(MOZ_OPTIMIZE_FLAGS)"
 endif # MOZ_OPTIMIZE=2
 endif # MOZ_OPTIMIZE
-ifeq (1,$(HAS_XCODE_2_1))
-# Xcode 2.1 puts its build products in a directory corresponding to the
-# selected build style/configuration.
-XCODE_PRODUCT_DIR = build/$(BUILDSTYLE)
-else
-XCODE_PRODUCT_DIR = build
-endif # HAS_XCODE_2_1=1
 endif # OS_ARCH=Darwin
 
 
 ifdef MOZ_NATIVE_MAKEDEPEND
 MKDEPEND_DIR	=
 MKDEPEND	= $(CYGWIN_WRAPPER) $(MOZ_NATIVE_MAKEDEPEND)
 else
 MKDEPEND_DIR	= $(CONFIG_TOOLS)/mkdepend
--- a/configure.in
+++ b/configure.in
@@ -943,36 +943,23 @@ from building Mozilla. Upgrade to Xcode 
         fi
     fi
 
     dnl xcodebuild needs GCC_VERSION defined in the environment, since it
     dnl doesn't respect the CC/CXX setting.  With GCC_VERSION set, it will use
     dnl /usr/bin/g(cc|++)-$GCC_VERSION.
     MOZ_PATH_PROGS(PBBUILD, pbbuild xcodebuild pbxbuild)
 
-    case "$PBBUILD" in
-      *xcodebuild*)
-        changequote(,)
-        XCODEBUILD_VERSION=`$PBBUILD -version 2>/dev/null | xargs | sed -e 's/.*DevToolsCore-\([0-9]*\).*/\1/'`
-        changequote([,])
-        if test -n "$XCODEBUILD_VERSION" && test "$XCODEBUILD_VERSION" -ge 620 ; then
-          HAS_XCODE_2_1=1;
-        fi
-      ;;
-    esac
-
     dnl sdp was formerly in /Developer/Tools.  As of Mac OS X 10.4 (Darwin 8),
     dnl it has moved into /usr/bin.
     MOZ_PATH_PROG(SDP, sdp, :, [$PATH:/usr/bin:/Developer/Tools])
     ;;
 esac
 
 AC_SUBST(GCC_VERSION)
-AC_SUBST(XCODEBUILD_VERSION)
-AC_SUBST(HAS_XCODE_2_1)
 
 dnl The universal machinery sets UNIVERSAL_BINARY to inform packager.mk
 dnl that a universal binary is being produced.
 AC_SUBST(UNIVERSAL_BINARY)
 
 dnl ========================================================
 dnl Check for MacOS deployment target version
 dnl ========================================================
--- a/mail/components/search/mdimporter/Makefile.in
+++ b/mail/components/search/mdimporter/Makefile.in
@@ -37,16 +37,20 @@
 
 DEPTH		= ../../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
+# Xcode 2.1 and newer puts its build products in a directory corresponding to
+# the selected build style/configuration.
+XCODE_PRODUCT_DIR = build/$(BUILDSTYLE)
+
 MODULE = mdimporter
 
 include $(topsrcdir)/config/rules.mk
 
 ifeq (,$(findstring pbxbuild,$(PBBUILD)))
     # pbbuild or xcodebuild indicates Xcode; the Xcode project contains
     # native targets needed for proper SDK builds.
     PROJECT=TBSpotlight.xcodeproj