Port flight.mk part of bug 556644 to fix mac build bustage. r=bustage fix
authorMark Banner <bugzilla@standard8.plus.com>
Fri, 13 Aug 2010 09:10:49 +0100
changeset 6150 219859fc6e217719af64d6db413a6556db857623
parent 6149 ec76ca68cbcee0b6874cb3f9f9c34467baec50da
child 6151 8412fc6cd1926ee1305b1a7ad858e666f436d93a
push idunknown
push userunknown
push dateunknown
reviewersbustage
bugs556644
Port flight.mk part of bug 556644 to fix mac build bustage. r=bustage fix
build/macosx/universal/flight.mk
--- a/build/macosx/universal/flight.mk
+++ b/build/macosx/universal/flight.mk
@@ -61,17 +61,25 @@ ifdef LIBXUL_SDK # {
 APP_CONTENTS = Contents/Frameworks/XUL.framework
 else # } {
 APP_CONTENTS = Contents/MacOS
 endif # } LIBXUL_SDK
 
 MOZ_PKG_APPNAME = $(MOZ_APP_NAME)
 APPNAME = $(MOZ_APP_DISPLAYNAME)$(DBGTAG).app
 INSTALLER_DIR = $(MOZ_BUILD_APP)/installer
-BUILDCONFIG_JAR = $(APP_CONTENTS)/chrome/toolkit.jar
+BUILDCONFIG_BASE = $(APP_CONTENTS)/chrome
+
+ifeq ($(MOZ_CHROME_FILE_FORMAT),jar)
+BUILDCONFIG = $(BUILDCONFIG_BASE)/toolkit.jar
+FIX_MODE = jar
+else
+BUILDCONFIG = $(BUILDCONFIG_BASE)/toolkit/
+FIX_MODE = file
+endif
 
 postflight_all:
 # Build the universal package out of only the bits that would be released.
 # Call the packager to set this up.  Set UNIVERSAL_BINARY= to avoid producing
 # a universal binary too early, before the unified bits have been staged.
 # Set SIGN_NSS= to skip shlibsign.
 	$(MAKE) -C $(OBJDIR_ARCH_1)/$(INSTALLER_DIR) \
 	        UNIVERSAL_BINARY= SIGN_NSS= PKG_SKIP_STRIP=1 stage-package
@@ -80,19 +88,19 @@ postflight_all:
 # Remove .chk files that may have been copied from the NSS build.  These will
 # cause unify to warn or fail if present.  New .chk files that are
 # appropriate for the merged libraries will be generated when the universal
 # dmg is built.
 	rm -f $(DIST_ARCH_1)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(APP_CONTENTS)/*.chk \
 	      $(DIST_ARCH_2)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(APP_CONTENTS)/*.chk
 # The only difference betewen the two trees now should be the
 # about:buildconfig page.  Fix it up.
-	$(TOPSRCDIR)/mozilla/build/macosx/universal/fix-buildconfig \
-	  $(DIST_ARCH_1)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(BUILDCONFIG_JAR) \
-	  $(DIST_ARCH_2)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(BUILDCONFIG_JAR)
+	$(TOPSRCDIR)/mozilla/build/macosx/universal/fix-buildconfig $(FIX_MODE) \
+	  $(DIST_ARCH_1)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(BUILDCONFIG) \
+	  $(DIST_ARCH_2)/$(MOZ_PKG_APPNAME)/$(APPNAME)/$(BUILDCONFIG)
 	mkdir -p $(DIST_UNI)/$(MOZ_PKG_APPNAME)
 	rm -f $(DIST_ARCH_2)/universal
 	ln -s $(DIST_UNI) $(DIST_ARCH_2)/universal
 	rm -rf $(DIST_UNI)/$(MOZ_PKG_APPNAME)/$(APPNAME)
 ifdef MOZ_CALENDAR
 ifndef DISABLE_LIGHTNING_INSTALL
 ifndef MOZ_SUNBIRD
 # workaround for different platforms in lightning installrdf