Bug 793628 - Produce Lightning Nightly builds during Thunderbird build process - Fix Mac Universal builds. r=Standard8
authorPhilipp Kewisch <mozilla@kewis.ch>
Thu, 15 Nov 2012 10:21:24 +0100
changeset 11515 f9cec7b19696784a459ba98a9af47764d3b8882b
parent 11514 ae19df26b793199c6d7c419d673ed5c27b5f5496
child 11516 dd55bf51eeae1bd977fd10e4f39fbd33021e28fb
push id8604
push usermozilla@kewis.ch
push dateThu, 15 Nov 2012 10:15:07 +0000
treeherdercomm-central@f9cec7b19696 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs793628
Bug 793628 - Produce Lightning Nightly builds during Thunderbird build process - Fix Mac Universal builds. r=Standard8
calendar/lightning/build/universal.mk
calendar/lightning/lightning-packager.mk
calendar/providers/gdata/universal.mk
mail/config/mozconfigs/macosx-universal/l10n-mozconfig
mail/config/mozconfigs/macosx-universal/nightly
mail/config/mozconfigs/macosx-universal/release
--- a/calendar/lightning/build/universal.mk
+++ b/calendar/lightning/build/universal.mk
@@ -7,17 +7,25 @@ OBJDIR_ARCH_1 = $(MOZ_OBJDIR)/$(firstwor
 OBJDIR_ARCH_2 = $(MOZ_OBJDIR)/$(word 2,$(MOZ_BUILD_PROJECTS))
 DIST_ARCH_1 = $(OBJDIR_ARCH_1)/mozilla/dist
 DIST_ARCH_2 = $(OBJDIR_ARCH_2)/mozilla/dist
 DIST_UNI = $(DIST_ARCH_1)/universal
 OBJDIR = $(OBJDIR_ARCH_1)
 endif
 
 topsrcdir = $(TOPSRCDIR)
-include $(OBJDIR)/config/autoconf.mk
+DEPTH = $(OBJDIR)
+
+include $(DEPTH)/config/autoconf.mk
+include $(topsrcdir)/mozilla/toolkit/mozapps/installer/package-name.mk
+
+LIGHTNING_VERSION := $(shell cat $(topsrcdir)/calendar/sunbird/config/version.txt)
+XPI_PKGNAME = lightning-$(LIGHTNING_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM)
+
+include $(TOPSRCDIR)/config/config.mk
 
 postflight_all:
 	mkdir -p $(DIST_UNI)/xpi-stage
 	rm -rf $(DIST_UNI)/xpi-stage/lightning*
 	cp -R $(DIST_ARCH_1)/xpi-stage/lightning $(DIST_UNI)/xpi-stage
 	rm -f $(DIST_UNI)/xpi-stage/lightning/components/components.manifest
 	platform=`$(PYTHON) $(TOPSRCDIR)/calendar/lightning/build/get-platform.py \
 		$(DIST_ARCH_1)/xpi-stage/lightning`; \
@@ -30,9 +38,9 @@ postflight_all:
 	mkdir -p $(DIST_UNI)/xpi-stage/lightning/components/$$platform; \
 	cp $(DIST_ARCH_2)/xpi-stage/lightning/components/*.dylib \
 		$(DIST_UNI)/xpi-stage/lightning/components/$$platform; \
 	$(foreach dylib,$(wildcard $(DIST_ARCH_2)/xpi-stage/lightning/components/*.dylib),echo binary-component $$platform/$(notdir $(dylib)) ABI=$$platform >> $(DIST_UNI)/xpi-stage/lightning/components/components.manifest)
 	$(PYTHON) $(TOPSRCDIR)/build/merge-installrdf.py \
 		$(DIST_ARCH_1)/xpi-stage/lightning \
 		$(DIST_ARCH_2)/xpi-stage/lightning \
 		> $(DIST_UNI)/xpi-stage/lightning/install.rdf
-	cd $(DIST_UNI)/xpi-stage/lightning && $(ZIP) -qr ../lightning.xpi *
+	cd $(DIST_UNI)/xpi-stage/lightning && $(ZIP) -qr ../$(XPI_PKGNAME).xpi *
--- a/calendar/lightning/lightning-packager.mk
+++ b/calendar/lightning/lightning-packager.mk
@@ -124,17 +124,17 @@ repack-process-extrafiles:
 	 
 	 echo -n "BuildID=" >> $(LIBXUL_DIST)/bin/platform.ini
 	 $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(DIST)/$(UNIVERSAL_PATH)xpi-stage/$(XPI_NAME)/application.ini App BuildID >> $(LIBXUL_DIST)/bin/platform.ini
 
 recreate-platformini: $(LIBXUL_DIST)/bin/platform.ini
 
 stage_upload:
 	$(NSINSTALL) -D $(DIST)/$(MOZ_PKG_PLATFORM)
-	$(INSTALL) $(IFLAGS1) $(DIST)/xpi-stage/$(XPI_PKGNAME).xpi $(DIST)/$(MOZ_PKG_PLATFORM)
+	$(INSTALL) $(IFLAGS1) $(DIST)/$(UNIVERSAL_PATH)/xpi-stage/$(XPI_PKGNAME).xpi $(DIST)/$(MOZ_PKG_PLATFORM)
 	$(INSTALL) $(IFLAGS1) $(DIST)/xpi-stage/$(GDATA_XPI_PKGNAME).xpi $(DIST)/$(MOZ_PKG_PLATFORM)
 
 # Lightning uses Thunderbird's build machinery, so we need to hack the post
 # upload command to use Lightning's directories.
 upload: POST_UPLOAD_CMD := $(subst thunderbird,calendar/lightning,$(POST_UPLOAD_CMD))
 upload: stage_upload
 	POST_UPLOAD_CMD="$(POST_UPLOAD_CMD)" \
 	  $(PYTHON) $(MOZILLA_DIR)/build/upload.py --base-path $(DIST) \
deleted file mode 100644
--- a/calendar/providers/gdata/universal.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-ifndef OBJDIR
-OBJDIR_ARCH_1 = $(MOZ_OBJDIR)/$(firstword $(MOZ_BUILD_PROJECTS))
-OBJDIR_ARCH_2 = $(MOZ_OBJDIR)/$(word 2,$(MOZ_BUILD_PROJECTS))
-DIST_ARCH_1 = $(OBJDIR_ARCH_1)/mozilla/dist
-DIST_ARCH_2 = $(OBJDIR_ARCH_2)/mozilla/dist
-DIST_UNI = $(DIST_ARCH_1)/universal
-OBJDIR = $(OBJDIR_ARCH_1)
-endif
-
-# This is fine as long as the gdata provider has no binary components.
-postflight_all:
-	mkdir -p $(DIST_UNI)/xpi-stage
-	cp $(DIST_ARCH_1)/xpi-stage/gdata-provider.xpi $(DIST_UNI)/xpi-stage
--- a/mail/config/mozconfigs/macosx-universal/l10n-mozconfig
+++ b/mail/config/mozconfigs/macosx-universal/l10n-mozconfig
@@ -12,16 +12,19 @@ fi
 # Universal builds override the default of mail (bug 575283 comment 29)
 ac_add_options --enable-application=mail
 ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
 ac_add_options --enable-update-packaging
 ac_add_options --enable-codesighs
 ac_add_options --disable-install-strip
 ac_add_options --enable-profiling
 
+# Make sure Lightning is also unified
+mk_add_options MOZ_POSTFLIGHT_ALL+=calendar/lightning/build/universal.mk
+
 # For NSS symbols
 export MOZ_DEBUG_SYMBOLS=1
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 # Enable parallel compiling
 CONCURRENCY=$(( `sysctl hw.logicalcpu | awk {'print $2'}`  + 2 ))
--- a/mail/config/mozconfigs/macosx-universal/nightly
+++ b/mail/config/mozconfigs/macosx-universal/nightly
@@ -23,16 +23,19 @@ ac_add_options --enable-calendar
 export MOZ_DEBUG_SYMBOLS=1
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 # Don't install Lightning into Thunderbird
 export DISABLE_LIGHTNING_INSTALL=1
 
+# Make sure Lightning is also unified
+mk_add_options MOZ_POSTFLIGHT_ALL+=calendar/lightning/build/universal.mk
+
 # Enable parallel compiling
 CONCURRENCY=$(( `sysctl hw.logicalcpu | awk {'print $2'}`  + 2 ))
 mk_add_options MOZ_MAKE_FLAGS="-j$CONCURRENCY"
 
 ac_add_options --with-ccache
 
 # Run client.py
 mk_add_options CLIENT_PY_ARGS="$(cat $topsrcdir/build/client.py-args)"
--- a/mail/config/mozconfigs/macosx-universal/release
+++ b/mail/config/mozconfigs/macosx-universal/release
@@ -20,15 +20,18 @@ ac_add_options --enable-calendar
 export MOZ_DEBUG_SYMBOLS=1
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 # Don't install Lightning into Thunderbird
 export DISABLE_LIGHTNING_INSTALL=1
 
+# Make sure Lightning is also unified
+mk_add_options MOZ_POSTFLIGHT_ALL+=calendar/lightning/build/universal.mk
+
 # Enable parallel compiling
 CONCURRENCY=$(( `sysctl hw.logicalcpu | awk {'print $2'}`  + 2 ))
 mk_add_options MOZ_MAKE_FLAGS="-j$CONCURRENCY"
 
 # Run client.py
 mk_add_options CLIENT_PY_ARGS="$(cat $topsrcdir/build/client.py-args)"
 mk_add_options ALWAYS_RUN_CLIENT_PY=1