Bug 1382632 - make installers-% just work, tb follow-up; r=tomprince

This makes the thunderbird repacks incrementally better.

The current version is running compare-locales too often, but
given that we're downloading the lightning xpi 4 times on prod
right now, that seems to come with the territory.

I verified locally that merged strings are in Thunderbird and
in the lightning xpi on a mac, didn't test other platforms.

MozReview-Commit-ID: AuIePJsIhvU

--HG--
extra : rebase_source : 65d742e6dba7ce8ebc3b2bf7a6a07193105f8ec8
extra : amend_source : 890eab76ede8fac8589f1ed6c854bd856f2f1871
This commit is contained in:
Axel Hecht 2017-07-20 14:44:31 +02:00
Родитель 830594fa10
Коммит d0ca8bc1f4
2 изменённых файлов: 23 добавлений и 14 удалений

Просмотреть файл

@ -85,21 +85,18 @@ unpack: $(XPI_ZIP_IN)
langpack-en-US:
@echo "Skipping $@ as en-US is the default"
merge-%: AB_CD=$*
merge-%:
ifdef LOCALE_MERGEDIR
$(RM) -rf $(LOCALE_MERGEDIR)/calendar
$(RM) -rf $(REAL_LOCALE_MERGEDIR)/calendar
$(MOZILLA_SRCDIR)/mach compare-locales \
--merge-dir $(LOCALE_MERGEDIR) \
--merge-dir $(REAL_LOCALE_MERGEDIR) \
--l10n-ini $(topsrcdir)/calendar/locales/l10n.ini \
$*
# This file requires a bugfix with string changes, see bug 1154448
[ -f $(L10NBASEDIR)/$*/calendar/chrome/calendar/calendar-extract.properties ] && \
$(RM) $(LOCALE_MERGEDIR)/calendar/chrome/calendar/calendar-extract.properties \
$(RM) $(REAL_LOCALE_MERGEDIR)/calendar/chrome/calendar/calendar-extract.properties \
|| true
else
@echo "Not merging Lightning locales due to missing LOCALE_MERGEDIR"
endif
# Calling these targets with prerequisites causes the libs and subsequent
# targets to be switched in order due to some make voodoo. Therefore we call
@ -136,7 +133,9 @@ repack-stage:
# so that we can ensure we get the right xpi that gets repacked.
libs-%: FINAL_XPI_NAME=$(if $(L10N_XPI_NAME),$(L10N_XPI_NAME),$(XPI_NAME))
libs-%: FINAL_XPI_PKGNAME=$(if $(L10N_XPI_PKGNAME),$(L10N_XPI_PKGNAME),$(XPI_PKGNAME))
libs-%: AB_CD=$*
libs-%:
@$(MAKE) merge-$*
$(MAKE) -C locales libs AB_CD=$* FINAL_TARGET=$(ABS_DIST)/xpi-stage/$(FINAL_XPI_NAME) \
XPI_NAME=$(FINAL_XPI_NAME) XPI_PKGNAME=$(FINAL_XPI_PKGNAME) USE_EXTENSION_MANIFEST=1
$(MAKE) -C locales tools AB_CD=$* FINAL_TARGET=$(ABS_DIST)/xpi-stage/$(FINAL_XPI_NAME) \
@ -162,6 +161,8 @@ recreate-platformini: $(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-%: AB_CD=$*
upload-%: LTN_UPLOAD_CMD := $(patsubst $(THUNDERBIRD_VERSION)%,$(LIGHTNING_VERSION),$(subst thunderbird,calendar/lightning,$(POST_UPLOAD_CMD)))
upload-%: stage_upload
POST_UPLOAD_CMD="$(LTN_UPLOAD_CMD)" \

Просмотреть файл

@ -25,7 +25,7 @@ RETRIEVE_WINDOWS_INSTALLER = 1
MOZ_LANGPACK_EID=langpack-$(AB_CD)@thunderbird.mozilla.org
# For Nightly, we know where to get the builds from to do local repacks
ifdef NIGHTLY_BUILD
EN_US_BINARY_URL=https://archive.mozilla.org/pub/thunderbird/nightly/latest-comm-central
export EN_US_BINARY_URL ?= https://archive.mozilla.org/pub/thunderbird/nightly/latest-comm-central
endif
L10N_PREF_JS_EXPORTS = $(call MERGE_FILE,all-l10n.js)
@ -83,7 +83,14 @@ searchplugins:: $(list-json)
$(DIST)/branding:
$(NSINSTALL) -D $@
libs-%: AB_CD=$*
libs-%:
# merge if we're not en-US. Conditional function because
# we need the current value of AB_CD.
$(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
ifdef MOZ_CALENDAR
$(if $(filter en-US,$(AB_CD)),, @$(MAKE) -C ../../calendar/lightning merge-$*)
endif
$(NSINSTALL) -D $(DIST)/install
@$(MAKE) -C $(DEPTH)/toolkit/locales libs-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
@$(MAKE) -C $(DEPTH)/devtools/client/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
@ -189,26 +196,26 @@ l10n-check::
$(RM) -rf x-test
$(NSINSTALL) -D x-test/toolkit
echo '#define MOZ_LANG_TITLE Just testing' > x-test/toolkit/defines.inc
$(MAKE) installers-x-test L10NBASEDIR='$(PWD)' LOCALE_MERGEDIR='$(PWD)/mergedir'
$(MAKE) installers-x-test L10NBASEDIR='$(PWD)'
ifdef MOZ_CALENDAR
LIGHTNING_PATH=$(DEPTH)/calendar/lightning
GDATA_PATH=$(DEPTH)/calendar/providers/gdata
define run-calendar-rule
$(MAKE) -C $(LIGHTNING_PATH) LOCALE_MERGEDIR=$(LOCALE_MERGEDIR) $(subst calendar-,,$@)
$(MAKE) -C $(GDATA_PATH) LOCALE_MERGEDIR=$(LOCALE_MERGEDIR) $(subst calendar-,,$@)
$(MAKE) -C $(LIGHTNING_PATH) $(subst calendar-,,$@) AB_CD=$(AB_CD)
$(MAKE) -C $(GDATA_PATH) $(subst calendar-,,$@) AB_CD=$(AB_CD)
endef
# Add calendar targets for pattern rules. Unfortunately multiple pattern rules
# on the left hand side do something different with make, therefore we need to
# write a line for each target.
calendar-merge-%:
$(run-calendar-rule)
calendar-clobber-%:
$(run-calendar-rule)
calendar-langpack-%: AB_CD=$*
calendar-langpack-%:
$(run-calendar-rule)
calendar-repackage-zip-%: AB_CD=$*
calendar-repackage-zip-%:
$(run-calendar-rule)
calendar-wget-en-US:
@ -231,12 +238,13 @@ unpack: calendar-unpack
upload: calendar-upload
# Hook into the pattern rules, this will be used later on in the installers-% target.
CALENDAR_INSTALLERS_TARGETS = calendar-merge-% calendar-clobber-% calendar-langpack-% calendar-repackage-zip-%
CALENDAR_INSTALLERS_TARGETS = calendar-clobber-% calendar-langpack-% calendar-repackage-zip-%
endif
# This is a generic target that will make a langpack, repack ZIP (+tarball)
# builds, and repack and installer if applicable. It is called from the
# tinderbox scripts. Alter it with caution.
INSTALLERS_TARGETS = clobber-% $(CALENDAR_INSTALLERS_TARGETS) langpack-% repackage-win32-installer-% repackage-zip-%
installers-%: IS_LANGUAGE_REPACK=1
installers-%: $(INSTALLERS_TARGETS)
@echo 'repackaging done'