Bug 1392245: Make l10n repack builds do what they're supposed to do (port
bug 1385227).
MozReview-Commit-ID: DfR9mM8mgl
--- a/mail/locales/Makefile.in
+++ b/mail/locales/Makefile.in
@@ -14,18 +14,16 @@ SUBMAKEFILES += \
# This makefile uses variable overrides from the libs-% target to
# build non-default locales to non-default dist/ locations. Be aware!
PWD := $(CURDIR)
# These are defaulted to be compatible with the files the wget-en-US target
# pulls. You may override them if you provide your own files.
ZIP_IN ?= $(ABS_DIST)/$(PACKAGE)
-WIN32_INSTALLER_IN ?= $(ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
-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
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)
@@ -38,25 +36,16 @@ MOZ_PKG_MAC_DSSTORE=$(ABS_DIST)/branding
MOZ_PKG_MAC_BACKGROUND=$(ABS_DIST)/branding/background.png
MOZ_PKG_MAC_ICON=$(ABS_DIST)/branding/disk.icns
MOZ_PKG_MAC_EXTRA=--symlink '/Applications:/ '
endif
MOZ_SFX_PACKAGE=$(commtopsrcdir)/other-licenses/7zstub/thunderbird/7zSD.sfx
MOZ_INSTALLER_PATH=$(commtopsrcdir)/mail/installer/windows
-ifeq (WINNT,$(OS_ARCH))
-UNINSTALLER_PACKAGE_HOOK = $(RM) -r $(STAGEDIST)/uninstall; \
- $(NSINSTALL) -D $(STAGEDIST)/uninstall; \
- cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall; \
- $(RM) $(ABS_DIST)/l10n-stage/setup.exe; \
- cp ../installer/windows/l10ngen/setup.exe $(ABS_DIST)/l10n-stage; \
- $(NULL)
-endif
-
NON_OMNIJAR_FILES = defaults/messenger/mailViews.dat
SEARCHPLUGINS_FILENAMES := $(shell $(call py_action,output_searchplugins_list,$(srcdir)/search/list.json $(AB_CD)))
SEARCHPLUGINS_PATH := .deps/generated_$(AB_CD)
SEARCHPLUGINS_TARGET := libs searchplugins
SEARCHPLUGINS := $(foreach plugin,$(addsuffix .xml,$(SEARCHPLUGINS_FILENAMES)),$(or $(wildcard $(call EN_US_OR_L10N_FILE,searchplugins/$(plugin))),$(warning Missing searchplugin: $(plugin))))
# Some locale-specific search plugins may have preprocessor directives, but the
# default en-US ones do not.
@@ -101,37 +90,29 @@ endif
@$(MAKE) -B searchplugins AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
# Note the funny extra '../' in SFX_HEADER is because the repackage-zip command
# is actually run effectively from within the mozilla/ part of the objdir, so
# topsrcdir points to the wrong place and we have to go one directory higher.
-repackage-win32-installer: WIN32_INSTALLER_OUT=$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
-repackage-win32-installer: $(call ESCAPE_WILDCARD,$(WIN32_INSTALLER_IN)) $(SUBMAKEFILES) libs-$(AB_CD)
- @echo 'Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT).'
- $(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export
+package-win32-installer: WIN32_INSTALLER_OUT=$(ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
+package-win32-installer: $(SUBMAKEFILES)
+ @echo 'Packaging $(WIN32_INSTALLER_OUT).'
$(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx
- $(MAKE) repackage-zip \
- AB_CD=$(AB_CD) \
- MOZ_PKG_FORMAT=SFX7Z \
- ZIP_IN='$(WIN32_INSTALLER_IN)' \
- ZIP_OUT='$(WIN32_INSTALLER_OUT)' \
- SFX_HEADER='$(PWD)/../installer/windows/l10ngen/7zSD.sfx \
- $(_ABS_SRCDIR)/mail/installer/windows/app.tag'
-
-ifeq (WINNT,$(OS_ARCH))
-repackage-win32-installer-%: unpack
- @$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN='$(WIN32_INSTALLER_IN)'
-
-repackage-zip-%: repackage-win32-installer-%
-else
-repackage-win32-installer-%: ;
-endif
+ $(RM) -r $(STAGEDIST)/uninstall; \
+ $(NSINSTALL) -D $(STAGEDIST)/uninstall; \
+ cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall; \
+ $(RM) $(ABS_DIST)/l10n-stage/setup.exe; \
+ cp ../installer/windows/l10ngen/setup.exe $(ABS_DIST)/l10n-stage; \
+ (cd $(DIST)/l10n-stage; \
+ $(MAKE_PACKAGE)
+ mv -f '$(DIST)/l10n-stage/$(PACKAGE)' '$(WIN32_INSTALLER_OUT)'
+ if test -f '$(DIST)/l10n-stage/$(PACKAGE).asc'; then mv -f '$(DIST)/l10n-stage/$(PACKAGE).asc' '$(WIN32_INSTALLER_OUT).asc'; fi
langpack: langpack-$(AB_CD)
ifdef MOZ_UPDATER
libs:: $(call MERGE_FILE,updater/updater.ini) $(call mkdir_deps,$(DIST)/bin)
ifeq ($(OS_ARCH),WINNT)
cat $< $(srcdir)/../installer/windows/nsis/updater_append.ini | \
sed -e 's/^InfoText=/Info=/' -e 's/^TitleText=/Title=/' | \
@@ -193,17 +174,17 @@ endif
# test target, depends on make package
# try to repack x-test, with just toolkit/defines.inc being there
l10n-check:: INNER_UNMAKE_PACKAGE=true
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)' \
- ZIP_IN='$(ZIP_IN)' WIN32_INSTALLER_IN='$(WIN32_INSTALLER_IN)' MOZ_SIMPLE_PACKAGE_NAME=
+ ZIP_IN='$(ZIP_IN)' MOZ_SIMPLE_PACKAGE_NAME=
$(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/unpack.py $(DIST)/l10n-stage/$(MOZ_PKG_DIR)$(_RESPATH)
cd $(DIST)/l10n-stage && test $$(cat $(MOZ_PKG_DIR)$(_RESPATH)/update.locale) = x-test
ifdef MOZ_CALENDAR
LIGHTNING_PATH=$(commtopobjdir)/calendar/lightning
GDATA_PATH=$(commtopobjdir)/calendar/providers/gdata
define run-calendar-rule
@@ -235,20 +216,28 @@ MOZ_PKG_EXTRAL10N += extensions/{e2fda1a
else
MOZ_PKG_EXTRAL10N += distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}=$(DIST)/xpi-stage/lightning-$(AB_CD)
endif
# Hook calendar targets to the mail non-pattern rules
wget-en-US: calendar-wget-en-US
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-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)
+installers-%:
+ @$(MAKE) clobber-$*
+ifdef MOZ_CALENDAR
+ @$(MAKE) calendar-clobber-$*
+ @$(MAKE) calendar-langpack-$*
+ @$(MAKE) calendar-repackage-zip-$*
+endif
+ @$(MAKE) libs-$*
+ @$(MAKE) package-langpack-$*
+ @$(MAKE) repackage-zip-$*
+ifeq (WINNT,$(OS_ARCH))
+ @$(MAKE) package-win32-installer AB_CD=$* MOZ_PKG_FORMAT=SFX7Z
+endif
@echo 'repackaging done'