Fix bug 884291 - Localized Lightning *nightly* builds using Thunderbird Infrastructure. r=Callek
authorPhilipp Kewisch <mozilla@kewis.ch>
Thu, 20 Jun 2013 23:57:34 +0200
changeset 15775 da5a6f0f184724ec88b34d50b24edfb0853952b1
parent 15774 14619b6507930e66d39e9c955384c16f5e83f395
child 15776 f93bc8ffa304b2dd836db1ecf5b12b683893a475
push id942
push userbugzilla@standard8.plus.com
push dateMon, 05 Aug 2013 19:15:38 +0000
treeherdercomm-beta@0e1a1c4a9f0c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek
bugs884291
Fix bug 884291 - Localized Lightning *nightly* builds using Thunderbird Infrastructure. r=Callek
calendar/lightning/Makefile.in
calendar/lightning/lightning-packager.mk
--- a/calendar/lightning/Makefile.in
+++ b/calendar/lightning/Makefile.in
@@ -119,16 +119,17 @@ DEFINES += -DGRE_BUILDID=$(GRE_BUILDID)
 libs::
 	$(NSINSTALL) -m 0644 $(srcdir)/../timezones/timezones.sqlite $(FINAL_TARGET)
 
 include $(topsrcdir)/config/rules.mk
 include $(srcdir)/lightning-packager.mk
 
 # For Lightning, we also need to preprocess the l10n prefs
 repack-process-extrafiles: lightning-extrafiles
+lightning-extrafiles: LOCALE_BASEDIR=$(call EXPAND_LOCALE_SRCDIR,calendar/locales)
 lightning-extrafiles:
 	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $(LOCALE_BASEDIR)/lightning-l10n.js  > $(DIST)/$(UNIVERSAL_PATH)xpi-stage/$(L10N_XPI_NAME)/$(PREF_DIR)/lightning-l10n.js
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 # If the macbundle dist dir was already created, sync lightning here to avoid
 # the need to make -C objdir/mail/app each time
 libs::
 	[ -d $(DIST)/$(MOZ_MACBUNDLE_NAME) ] && rsync -aL $(FINAL_TARGET)/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/extensions/$(XPI_EM_ID) || true
--- a/calendar/lightning/lightning-packager.mk
+++ b/calendar/lightning/lightning-packager.mk
@@ -45,17 +45,17 @@ L10N_TARGET = $(XPI_STAGE_PATH)/$(XPI_NA
 # special case, so assume linux for everything else.
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 SHORTOS = osx
 else
 SHORTOS = linux
 endif
 
 # function oslocales(filename)
-oslocales = $(shell awk '{ if ($$2 == "" || $$2 == "$(SHORTOS)") { print $$1 } }' $1)
+oslocales = $(shell $(AWK) '{ if ($$2 == "" || $$2 == "$(SHORTOS)") { print $$1 } }' $(1))
 
 # function apposlocales(app)
 apposlocales = $(call oslocales,$(topsrcdir)/$1/locales/$(if $(filter $(MOZ_UPDATE_CHANNEL),beta release),shipped-locales,all-locales))
 
 # function print_ltnconfig(section,configname)
 print_ltnconfig = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(XPI_STAGE_PATH)/$(XPI_NAME)/application.ini $1 $2)
 
 # Lightning uses Thunderbird's build machinery, so we need to hack the binary
@@ -90,19 +90,19 @@ unpack: $(ZIP_IN)
 
 # Nothing to package for en-US, its just the usual english xpi
 langpack-en-US:
 	@echo "Skipping $@ as en-US is the default"
 
 # Skip those locales in Thunderbird but not in Lightning. Use either
 # all-locales or shipped-locales, depending on if we are doing a
 # regular repack or a release repack
-CAL_LOCALES = $(call apposlocales,calendar)
-TB_LOCALES = $(call apposlocales,mail)
-TB_SKIP_LOCALES = $(filter-out $(CAL_LOCALES) en-US,$(TB_LOCALES))
+CAL_LOCALES := $(call apposlocales,calendar)
+TB_LOCALES := $(call apposlocales,mail)
+TB_SKIP_LOCALES := $(filter-out $(CAL_LOCALES) en-US,$(TB_LOCALES))
 $(addprefix langpack-,$(TB_SKIP_LOCALES)) $(addprefix upload-,$(TB_SKIP_LOCALES)):
 	@echo "Skipping $@ as it is not in Lightning's locales: $(CAL_LOCALES)"
 
 # Calling these targets with prerequisites causes the libs and subsequent
 # targets to be switched in order due to some make voodoo. Therefore we call
 # the targets explicitly, which seems to work better.
 langpack-%: L10N_XPI_NAME=$(XPI_NAME)-$*
 langpack-%: L10N_XPI_PKGNAME=$(subst $(AB_CD),$*,$(XPI_PKGNAME))
@@ -153,21 +153,22 @@ repack-process-extrafiles:
 	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py \
 	  $(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
 	  -I $(LOCALE_BASEDIR)/defines.inc \
 	  $(srcdir)/install.rdf > $(XPI_STAGE_PATH)/$(L10N_XPI_NAME)/install.rdf
 
 # When repackaging Lightning from the builder, platform.ini is not yet created.
 # Recreate it from the application.ini bundled with the downloaded xpi.
 $(LIBXUL_DIST)/bin/platform.ini:
-	 echo "[Build]" >> $(LIBXUL_DIST)/bin/platform.ini
-	 echo "Milestone=$(call print_ltnconfig,Gecko,MaxVersion)" >> $(LIBXUL_DIST)/bin/platform.ini
-	 echo "SourceStamp=$(call print_ltnconfig,Build,SourceStamp)" >> $(LIBXUL_DIST)/bin/platform.ini
-	 echo "SourceRepository=$(call print_ltnconfig,Build,SourceRepository)" >> $(LIBXUL_DIST)/bin/platform.ini
-	 echo "BuildID=$(call print_ltnconfig,App,BuildID)" >> $(LIBXUL_DIST)/bin/platform.ini
+	mkdir -p $(@D)
+	echo "[Build]" >> $(LIBXUL_DIST)/bin/platform.ini
+	echo "Milestone=$(call print_ltnconfig,Gecko,MaxVersion)" >> $(LIBXUL_DIST)/bin/platform.ini
+	echo "SourceStamp=$(call print_ltnconfig,Build,SourceStamp)" >> $(LIBXUL_DIST)/bin/platform.ini
+	echo "SourceRepository=$(call print_ltnconfig,Build,SourceRepository)" >> $(LIBXUL_DIST)/bin/platform.ini
+	echo "BuildID=$(call print_ltnconfig,App,BuildID)" >> $(LIBXUL_DIST)/bin/platform.ini
 
 recreate-platformini: $(LIBXUL_DIST)/bin/platform.ini
 
 
 # Lightning uses Thunderbird's build machinery, so we need to hack the post
 # upload command to use Lightning's directories and version.
 upload: upload-$(AB_CD)
 upload-%: LTN_UPLOAD_CMD := $(patsubst $(THUNDERBIRD_VERSION)%,$(XPI_VERSION),$(subst thunderbird,calendar/lightning,$(POST_UPLOAD_CMD)))