2009-01-23 14:21:52 +03:00
|
|
|
# vim:set ts=8 sw=8 sts=8 noet:
|
2012-05-21 15:12:37 +04:00
|
|
|
# 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/.
|
2009-01-23 14:21:52 +03:00
|
|
|
|
|
|
|
|
|
|
|
# Shared makefile that can be used to easily kick off l10n builds
|
|
|
|
# of Mozilla applications.
|
|
|
|
# This makefile should be included, and then assumes that the including
|
|
|
|
# makefile defines the following targets:
|
|
|
|
# libs-%
|
|
|
|
# This target should call into the various libs targets that this
|
|
|
|
# application depends on.
|
|
|
|
# installer-%
|
|
|
|
# This target should list all required targets, a typical rule would be
|
|
|
|
# installers-%: clobber-% langpack-% repackage-zip-%
|
|
|
|
# @echo "repackaging done"
|
|
|
|
# to initially clobber the locale staging area, and then to build the
|
|
|
|
# language pack and zip package.
|
|
|
|
# Other targets like windows installers might be listed, too, and should
|
|
|
|
# be defined in the including makefile.
|
2017-06-19 17:51:05 +03:00
|
|
|
# The installer-% targets should not set AB_CD, so that the unpackaging
|
|
|
|
# step finds the original package.
|
2009-01-23 14:21:52 +03:00
|
|
|
# The including makefile should provide values for the variables
|
|
|
|
# MOZ_APP_VERSION and MOZ_LANGPACK_EID.
|
|
|
|
|
|
|
|
|
2010-03-02 08:56:46 +03:00
|
|
|
run_for_effects := $(shell if test ! -d $(DIST); then $(NSINSTALL) -D $(DIST); fi)
|
2009-01-23 14:21:52 +03:00
|
|
|
|
|
|
|
# This makefile uses variable overrides from the libs-% target to
|
|
|
|
# build non-default locales to non-default dist/ locations. Be aware!
|
|
|
|
|
2015-07-22 09:02:28 +03:00
|
|
|
LPROJ_ROOT = $(firstword $(subst -, ,$(AB_CD)))
|
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
ifeq (zh-TW,$(AB_CD))
|
|
|
|
LPROJ_ROOT := $(subst -,_,$(AB_CD))
|
|
|
|
endif
|
|
|
|
endif
|
2009-01-23 14:21:52 +03:00
|
|
|
|
|
|
|
# These are defaulted to be compatible with the files the wget-en-US target
|
2017-01-10 19:12:10 +03:00
|
|
|
# pulls. You may override them if you provide your own files.
|
2015-12-30 03:33:50 +03:00
|
|
|
ZIP_IN ?= $(ABS_DIST)/$(PACKAGE)
|
|
|
|
WIN32_INSTALLER_IN ?= $(ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
|
2009-01-23 14:21:52 +03:00
|
|
|
|
2010-08-13 08:36:16 +04:00
|
|
|
# Allows overriding the final destination of the repackaged file
|
2015-12-30 03:33:50 +03:00
|
|
|
ZIP_OUT ?= $(ABS_DIST)/$(PACKAGE)
|
2010-08-13 08:36:16 +04:00
|
|
|
|
2015-10-30 05:31:14 +03:00
|
|
|
ACDEFINES += \
|
2009-01-23 14:21:52 +03:00
|
|
|
-DAB_CD=$(AB_CD) \
|
|
|
|
-DMOZ_LANGPACK_EID=$(MOZ_LANGPACK_EID) \
|
2016-01-04 21:58:42 +03:00
|
|
|
-DMOZ_APP_ID='$(MOZ_APP_ID)' \
|
2009-01-23 14:21:52 +03:00
|
|
|
-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
|
2012-04-23 17:09:41 +04:00
|
|
|
-DMOZ_APP_MAXVERSION=$(MOZ_APP_MAXVERSION) \
|
2013-10-17 02:55:16 +04:00
|
|
|
-DLOCALE_SRCDIR=$(abspath $(LOCALE_SRCDIR)) \
|
2013-12-03 01:34:21 +04:00
|
|
|
-DPKG_BASENAME='$(PKG_BASENAME)' \
|
|
|
|
-DPKG_INST_BASENAME='$(PKG_INST_BASENAME)' \
|
2009-01-23 14:21:52 +03:00
|
|
|
$(NULL)
|
|
|
|
|
bug 1370506, always merge for l10n repacks, with internally set merge dir, r=glandium
To not merge the en-US language pack, the merge-% steps are in
a conditional function that disables that for en-US. Using a function
here as that's easier than a shell if in the merge rule, and
Makefile conditionals don't get evaluated late enough.
To liberate the l10n builds from settings in the automation,
we move the patch logic from LOCALE_MERGEDIR to REAL_LOCALE_MERGEDIR.
To determine strongly when we're in a repack or building a langpack,
the trick here is to
export IS_LANGUAGE_REPACK
in l10n.mk, and only set that to true in the entry-point rules.
Now, we can use that value in config.mk to define the l10n-specific
rules.
I did the same thing for langpack-%, which allows us to disable
the crashreporter files for language packs, for example.
With that,
make installers-de
just works, if you have localizations checked out.
For a while, we might run l10n-merge twice in automation, but it's really not
optional, so let's just make sure we run it.
MozReview-Commit-ID: 3nr33CKxkBQ
--HG--
extra : rebase_source : 0605a4adba018fa4b85d563cdafba80b0533bc91
2017-06-16 16:21:16 +03:00
|
|
|
# export some global defines for l10n repacks
|
|
|
|
BASE_MERGE:=$(CURDIR)/merge-dir
|
|
|
|
export REAL_LOCALE_MERGEDIR=$(BASE_MERGE)/$(AB_CD)
|
|
|
|
# is an l10n repack step:
|
|
|
|
export IS_LANGUAGE_REPACK
|
|
|
|
# is a language pack:
|
|
|
|
export IS_LANGPACK
|
2009-01-23 14:21:52 +03:00
|
|
|
|
2017-06-19 17:51:05 +03:00
|
|
|
clobber-%: AB_CD=$*
|
2009-01-23 14:21:52 +03:00
|
|
|
clobber-%:
|
|
|
|
$(RM) -rf $(DIST)/xpi-stage/locale-$*
|
|
|
|
|
|
|
|
|
|
|
|
PACKAGER_NO_LIBS = 1
|
|
|
|
|
2009-09-19 06:59:53 +04:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2015-12-30 03:33:50 +03:00
|
|
|
STAGEDIST = $(ABS_DIST)/l10n-stage/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources
|
2009-01-23 14:21:52 +03:00
|
|
|
else
|
2015-12-30 03:33:50 +03:00
|
|
|
STAGEDIST = $(ABS_DIST)/l10n-stage/$(MOZ_PKG_DIR)
|
2009-01-23 14:21:52 +03:00
|
|
|
endif
|
2016-11-24 00:19:19 +03:00
|
|
|
UNPACKED_INSTALLER = $(ABS_DIST)/unpacked-installer
|
2009-01-23 14:21:52 +03:00
|
|
|
|
2011-12-08 22:06:44 +04:00
|
|
|
include $(MOZILLA_DIR)/toolkit/mozapps/installer/signing.mk
|
2011-12-08 02:06:52 +04:00
|
|
|
include $(MOZILLA_DIR)/toolkit/mozapps/installer/packager.mk
|
|
|
|
|
2015-12-30 03:33:50 +03:00
|
|
|
PACKAGE_BASE_DIR = $(ABS_DIST)/l10n-stage
|
2012-05-25 17:25:07 +04:00
|
|
|
|
2016-11-24 00:19:19 +03:00
|
|
|
$(UNPACKED_INSTALLER): AB_CD:=en-US
|
|
|
|
$(UNPACKED_INSTALLER): UNPACKAGE=$(call ESCAPE_WILDCARD,$(ZIP_IN))
|
|
|
|
$(UNPACKED_INSTALLER): $(call ESCAPE_WILDCARD,$(ZIP_IN))
|
2009-01-23 14:21:52 +03:00
|
|
|
# only mac needs to remove the parent of STAGEDIST...
|
2009-09-19 06:59:53 +04:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2016-11-24 00:19:19 +03:00
|
|
|
$(RM) -r -v $(UNPACKED_INSTALLER)
|
2009-01-23 14:21:52 +03:00
|
|
|
else
|
|
|
|
# ... and windows doesn't like removing STAGEDIST itself, remove all children
|
2016-11-24 00:19:19 +03:00
|
|
|
find $(UNPACKED_INSTALLER) -maxdepth 1 -print0 | xargs -0 $(RM) -r
|
2009-01-23 14:21:52 +03:00
|
|
|
endif
|
2016-11-24 00:19:19 +03:00
|
|
|
$(NSINSTALL) -D $(UNPACKED_INSTALLER)
|
|
|
|
cd $(UNPACKED_INSTALLER) && \
|
2013-01-23 14:23:15 +04:00
|
|
|
$(INNER_UNMAKE_PACKAGE)
|
2009-01-23 14:21:52 +03:00
|
|
|
|
|
|
|
|
2016-11-24 00:19:19 +03:00
|
|
|
unpack: $(UNPACKED_INSTALLER)
|
|
|
|
ifeq ($(OS_ARCH), WINNT)
|
|
|
|
$(RM) -r -f $(ABS_DIST)/l10n-stage
|
|
|
|
$(NSINSTALL) -D $(ABS_DIST)/l10n-stage
|
|
|
|
$(call copy_dir, $(UNPACKED_INSTALLER), $(ABS_DIST)/l10n-stage)
|
|
|
|
else
|
|
|
|
rsync -rav --delete $(UNPACKED_INSTALLER)/ $(ABS_DIST)/l10n-stage
|
|
|
|
endif
|
2009-01-23 14:21:52 +03:00
|
|
|
|
2010-08-19 23:21:56 +04:00
|
|
|
# The path to the object dir for the mozilla-central build system,
|
|
|
|
# may be overridden if necessary.
|
|
|
|
MOZDEPTH ?= $(DEPTH)
|
|
|
|
|
2017-09-16 12:04:13 +03:00
|
|
|
ifdef MOZ_MAKE_COMPLETE_MAR
|
|
|
|
MAKE_COMPLETE_MAR = 1
|
|
|
|
ifeq ($(OS_ARCH), WINNT)
|
|
|
|
ifneq ($(MOZ_PKG_FORMAT), SFX7Z)
|
|
|
|
MAKE_COMPLETE_MAR =
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
2013-12-03 01:34:21 +04:00
|
|
|
repackage-zip: UNPACKAGE='$(ZIP_IN)'
|
2017-09-16 12:04:13 +03:00
|
|
|
repackage-zip: libs-$(AB_CD)
|
|
|
|
# call a hook for apps to put their uninstall helper.exe into the package
|
|
|
|
$(UNINSTALLER_PACKAGE_HOOK)
|
|
|
|
# call a hook for apps to build the stub installer
|
|
|
|
ifdef MOZ_STUB_INSTALLER
|
|
|
|
$(STUB_HOOK)
|
|
|
|
endif
|
2013-01-25 03:38:47 +04:00
|
|
|
$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/l10n-repack.py $(STAGEDIST) $(DIST)/xpi-stage/locale-$(AB_CD) \
|
2015-04-19 23:57:20 +03:00
|
|
|
$(MOZ_PKG_EXTRAL10N) \
|
2013-01-25 03:38:47 +04:00
|
|
|
$(if $(filter omni,$(MOZ_PACKAGER_FORMAT)),$(if $(NON_OMNIJAR_FILES),--non-resource $(NON_OMNIJAR_FILES)))
|
2015-01-26 20:33:03 +03:00
|
|
|
|
2009-09-19 06:59:53 +04:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2015-07-22 09:02:28 +03:00
|
|
|
ifneq (en,$(LPROJ_ROOT))
|
|
|
|
mv $(STAGEDIST)/en.lproj $(STAGEDIST)/$(LPROJ_ROOT).lproj
|
2015-01-26 20:33:03 +03:00
|
|
|
endif
|
2014-10-10 15:02:20 +04:00
|
|
|
ifdef MOZ_CRASHREPORTER
|
|
|
|
# On Mac OS X, the crashreporter.ini file needs to be moved from under the
|
|
|
|
# application bundle's Resources directory where all other l10n files are
|
|
|
|
# located to the crash reporter bundle's Resources directory.
|
|
|
|
mv $(STAGEDIST)/crashreporter.app/Contents/Resources/crashreporter.ini \
|
|
|
|
$(STAGEDIST)/../MacOS/crashreporter.app/Contents/Resources/crashreporter.ini
|
|
|
|
$(RM) -rf $(STAGEDIST)/crashreporter.app
|
|
|
|
endif
|
2009-01-23 14:21:52 +03:00
|
|
|
endif
|
2015-01-26 20:33:03 +03:00
|
|
|
|
2009-01-23 14:21:52 +03:00
|
|
|
$(NSINSTALL) -D $(DIST)/l10n-stage/$(PKG_PATH)
|
2017-09-16 12:04:13 +03:00
|
|
|
cd $(DIST)/l10n-stage; \
|
|
|
|
$(MAKE_PACKAGE)
|
|
|
|
ifdef MAKE_COMPLETE_MAR
|
2010-08-19 12:28:05 +04:00
|
|
|
$(MAKE) -C $(MOZDEPTH)/tools/update-packaging full-update AB_CD=$(AB_CD) \
|
2015-12-30 03:33:50 +03:00
|
|
|
PACKAGE_BASE_DIR='$(ABS_DIST)/l10n-stage'
|
2009-01-23 14:21:52 +03:00
|
|
|
endif
|
|
|
|
# packaging done, undo l10n stuff
|
2015-07-22 09:02:28 +03:00
|
|
|
ifneq (en,$(LPROJ_ROOT))
|
2009-09-19 06:59:53 +04:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2015-07-22 09:02:28 +03:00
|
|
|
mv $(STAGEDIST)/$(LPROJ_ROOT).lproj $(STAGEDIST)/en.lproj
|
2009-01-23 14:21:52 +03:00
|
|
|
endif
|
2012-09-20 21:36:07 +04:00
|
|
|
endif
|
2009-01-23 14:21:52 +03:00
|
|
|
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
|
2013-12-03 01:34:21 +04:00
|
|
|
mv -f '$(DIST)/l10n-stage/$(PACKAGE)' '$(ZIP_OUT)'
|
|
|
|
if test -f '$(DIST)/l10n-stage/$(PACKAGE).asc'; then mv -f '$(DIST)/l10n-stage/$(PACKAGE).asc' '$(ZIP_OUT).asc'; fi
|
2009-01-23 14:21:52 +03:00
|
|
|
|
2016-11-24 00:19:19 +03:00
|
|
|
repackage-zip-%: unpack
|
2013-12-03 01:34:21 +04:00
|
|
|
@$(MAKE) repackage-zip AB_CD=$* ZIP_IN='$(ZIP_IN)'
|
2009-01-23 14:21:52 +03:00
|
|
|
|
2017-05-30 12:33:59 +03:00
|
|
|
|
2017-10-07 01:15:39 +03:00
|
|
|
ifdef IS_LANGUAGE_REPACK
|
|
|
|
MERGE_TK_FILE = $(firstword \
|
|
|
|
$(wildcard $(REAL_LOCALE_MERGEDIR)/$(subst /locales,,toolkit/locales)/$(1)) \
|
|
|
|
$(wildcard $(LOCALE_SRCDIR)/$(1)) \
|
|
|
|
$(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/$(1) )
|
|
|
|
else
|
|
|
|
MERGE_TK_FILE = $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/$(1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
LANGPACK_DEFINES = $(call MERGE_TK_FILE,defines.inc) $(call MERGE_DIR,defines.inc)
|
2009-01-23 14:21:52 +03:00
|
|
|
|
2013-02-07 01:21:32 +04:00
|
|
|
# Dealing with app sub dirs: If DIST_SUBDIRS is defined it contains a
|
|
|
|
# listing of app sub-dirs we should include in langpack xpis. If not,
|
|
|
|
# check DIST_SUBDIR, and if that isn't present, just package the default
|
|
|
|
# chrome directory.
|
|
|
|
PKG_ZIP_DIRS = chrome $(or $(DIST_SUBDIRS),$(DIST_SUBDIR))
|
|
|
|
|
bug 1370506, for Nightly builds, automatically clone l10n repos for localized installers, r=glandium
Making more decisions on behalf of developers:
L10NBASEDIR is always defined, if not specified, it's ~/.mozbuild/l10n-central,
or in MOZBUILD_STATE_PATH/l10n-central if the state path in defined in the
environment.
If a locale isn't checked out, do that. The targets for which that works are
merge-%, installers-%, langpack-%
But only do that for Nightly builds, as for Beta and beyond, we have
explicit revisions to use for the builds, and we don't want to break release
builds silently with this.
MozReview-Commit-ID: EhGJPLuiyYO
--HG--
extra : rebase_source : 61a92396920965107a8811679552c1992b29155e
2017-06-15 20:47:28 +03:00
|
|
|
# Clone a l10n repository, either via hg or git
|
|
|
|
# Make this a variable as it's embedded in a sh conditional
|
|
|
|
ifeq ($(VCS_CHECKOUT_TYPE),hg)
|
|
|
|
L10N_CO = $(HG) --cwd $(L10NBASEDIR) clone https://hg.mozilla.org/l10n-central/$(AB_CD)/
|
|
|
|
else
|
|
|
|
ifeq ($(VCS_CHECKOUT_TYPE),git)
|
|
|
|
L10N_CO = $(GIT) -C $(L10NBASEDIR) clone hg://hg.mozilla.org/l10n-central/$(AB_CD)/
|
|
|
|
else
|
|
|
|
L10N_CO = $(error You need to use either hg or git)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
bug 1370506, always merge for l10n repacks, with internally set merge dir, r=glandium
To not merge the en-US language pack, the merge-% steps are in
a conditional function that disables that for en-US. Using a function
here as that's easier than a shell if in the merge rule, and
Makefile conditionals don't get evaluated late enough.
To liberate the l10n builds from settings in the automation,
we move the patch logic from LOCALE_MERGEDIR to REAL_LOCALE_MERGEDIR.
To determine strongly when we're in a repack or building a langpack,
the trick here is to
export IS_LANGUAGE_REPACK
in l10n.mk, and only set that to true in the entry-point rules.
Now, we can use that value in config.mk to define the l10n-specific
rules.
I did the same thing for langpack-%, which allows us to disable
the crashreporter files for language packs, for example.
With that,
make installers-de
just works, if you have localizations checked out.
For a while, we might run l10n-merge twice in automation, but it's really not
optional, so let's just make sure we run it.
MozReview-Commit-ID: 3nr33CKxkBQ
--HG--
extra : rebase_source : 0605a4adba018fa4b85d563cdafba80b0533bc91
2017-06-16 16:21:16 +03:00
|
|
|
merge-%: IS_LANGUAGE_REPACK=1
|
bug 1370506, for Nightly builds, automatically clone l10n repos for localized installers, r=glandium
Making more decisions on behalf of developers:
L10NBASEDIR is always defined, if not specified, it's ~/.mozbuild/l10n-central,
or in MOZBUILD_STATE_PATH/l10n-central if the state path in defined in the
environment.
If a locale isn't checked out, do that. The targets for which that works are
merge-%, installers-%, langpack-%
But only do that for Nightly builds, as for Beta and beyond, we have
explicit revisions to use for the builds, and we don't want to break release
builds silently with this.
MozReview-Commit-ID: EhGJPLuiyYO
--HG--
extra : rebase_source : 61a92396920965107a8811679552c1992b29155e
2017-06-15 20:47:28 +03:00
|
|
|
merge-%: AB_CD=$*
|
bug 1370506, always merge for l10n repacks, with internally set merge dir, r=glandium
To not merge the en-US language pack, the merge-% steps are in
a conditional function that disables that for en-US. Using a function
here as that's easier than a shell if in the merge rule, and
Makefile conditionals don't get evaluated late enough.
To liberate the l10n builds from settings in the automation,
we move the patch logic from LOCALE_MERGEDIR to REAL_LOCALE_MERGEDIR.
To determine strongly when we're in a repack or building a langpack,
the trick here is to
export IS_LANGUAGE_REPACK
in l10n.mk, and only set that to true in the entry-point rules.
Now, we can use that value in config.mk to define the l10n-specific
rules.
I did the same thing for langpack-%, which allows us to disable
the crashreporter files for language packs, for example.
With that,
make installers-de
just works, if you have localizations checked out.
For a while, we might run l10n-merge twice in automation, but it's really not
optional, so let's just make sure we run it.
MozReview-Commit-ID: 3nr33CKxkBQ
--HG--
extra : rebase_source : 0605a4adba018fa4b85d563cdafba80b0533bc91
2017-06-16 16:21:16 +03:00
|
|
|
merge-%:
|
bug 1370506, for Nightly builds, automatically clone l10n repos for localized installers, r=glandium
Making more decisions on behalf of developers:
L10NBASEDIR is always defined, if not specified, it's ~/.mozbuild/l10n-central,
or in MOZBUILD_STATE_PATH/l10n-central if the state path in defined in the
environment.
If a locale isn't checked out, do that. The targets for which that works are
merge-%, installers-%, langpack-%
But only do that for Nightly builds, as for Beta and beyond, we have
explicit revisions to use for the builds, and we don't want to break release
builds silently with this.
MozReview-Commit-ID: EhGJPLuiyYO
--HG--
extra : rebase_source : 61a92396920965107a8811679552c1992b29155e
2017-06-15 20:47:28 +03:00
|
|
|
# For nightly builds, we automatically check out missing localizations
|
|
|
|
# from l10n-central.
|
|
|
|
ifdef NIGHTLY_BUILD
|
|
|
|
@if ! test -d $(L10NBASEDIR)/$(AB_CD) ; then \
|
|
|
|
$(NSINSTALL) -D $(L10NBASEDIR) ; \
|
|
|
|
$(L10N_CO) ; \
|
|
|
|
fi
|
|
|
|
endif
|
bug 1370506, always merge for l10n repacks, with internally set merge dir, r=glandium
To not merge the en-US language pack, the merge-% steps are in
a conditional function that disables that for en-US. Using a function
here as that's easier than a shell if in the merge rule, and
Makefile conditionals don't get evaluated late enough.
To liberate the l10n builds from settings in the automation,
we move the patch logic from LOCALE_MERGEDIR to REAL_LOCALE_MERGEDIR.
To determine strongly when we're in a repack or building a langpack,
the trick here is to
export IS_LANGUAGE_REPACK
in l10n.mk, and only set that to true in the entry-point rules.
Now, we can use that value in config.mk to define the l10n-specific
rules.
I did the same thing for langpack-%, which allows us to disable
the crashreporter files for language packs, for example.
With that,
make installers-de
just works, if you have localizations checked out.
For a while, we might run l10n-merge twice in automation, but it's really not
optional, so let's just make sure we run it.
MozReview-Commit-ID: 3nr33CKxkBQ
--HG--
extra : rebase_source : 0605a4adba018fa4b85d563cdafba80b0533bc91
2017-06-16 16:21:16 +03:00
|
|
|
$(RM) -rf $(REAL_LOCALE_MERGEDIR)
|
2017-09-24 15:09:08 +03:00
|
|
|
-$(MOZILLA_DIR)/mach compare-locales --merge $(BASE_MERGE) $(srcdir)/l10n.toml $(L10NBASEDIR) $*
|
bug 1370506, always merge for l10n repacks, with internally set merge dir, r=glandium
To not merge the en-US language pack, the merge-% steps are in
a conditional function that disables that for en-US. Using a function
here as that's easier than a shell if in the merge rule, and
Makefile conditionals don't get evaluated late enough.
To liberate the l10n builds from settings in the automation,
we move the patch logic from LOCALE_MERGEDIR to REAL_LOCALE_MERGEDIR.
To determine strongly when we're in a repack or building a langpack,
the trick here is to
export IS_LANGUAGE_REPACK
in l10n.mk, and only set that to true in the entry-point rules.
Now, we can use that value in config.mk to define the l10n-specific
rules.
I did the same thing for langpack-%, which allows us to disable
the crashreporter files for language packs, for example.
With that,
make installers-de
just works, if you have localizations checked out.
For a while, we might run l10n-merge twice in automation, but it's really not
optional, so let's just make sure we run it.
MozReview-Commit-ID: 3nr33CKxkBQ
--HG--
extra : rebase_source : 0605a4adba018fa4b85d563cdafba80b0533bc91
2017-06-16 16:21:16 +03:00
|
|
|
|
2017-09-16 12:04:13 +03:00
|
|
|
langpack-%: LANGPACK_FILE=$(ABS_DIST)/$(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
|
|
|
|
langpack-%: AB_CD=$*
|
|
|
|
langpack-%: XPI_NAME=locale-$*
|
bug 1370506, always merge for l10n repacks, with internally set merge dir, r=glandium
To not merge the en-US language pack, the merge-% steps are in
a conditional function that disables that for en-US. Using a function
here as that's easier than a shell if in the merge rule, and
Makefile conditionals don't get evaluated late enough.
To liberate the l10n builds from settings in the automation,
we move the patch logic from LOCALE_MERGEDIR to REAL_LOCALE_MERGEDIR.
To determine strongly when we're in a repack or building a langpack,
the trick here is to
export IS_LANGUAGE_REPACK
in l10n.mk, and only set that to true in the entry-point rules.
Now, we can use that value in config.mk to define the l10n-specific
rules.
I did the same thing for langpack-%, which allows us to disable
the crashreporter files for language packs, for example.
With that,
make installers-de
just works, if you have localizations checked out.
For a while, we might run l10n-merge twice in automation, but it's really not
optional, so let's just make sure we run it.
MozReview-Commit-ID: 3nr33CKxkBQ
--HG--
extra : rebase_source : 0605a4adba018fa4b85d563cdafba80b0533bc91
2017-06-16 16:21:16 +03:00
|
|
|
langpack-%: IS_LANGUAGE_REPACK=1
|
|
|
|
langpack-%: IS_LANGPACK=1
|
2017-09-16 12:04:13 +03:00
|
|
|
langpack-%: libs-%
|
2013-12-03 01:34:21 +04:00
|
|
|
@echo 'Making langpack $(LANGPACK_FILE)'
|
2009-01-23 14:21:52 +03:00
|
|
|
$(NSINSTALL) -D $(DIST)/$(PKG_LANGPACK_PATH)
|
2017-10-07 01:15:39 +03:00
|
|
|
$(call py_action,langpack_manifest,--locales $(AB_CD) --min-app-ver $(MOZ_APP_VERSION) --max-app-ver $(MOZ_APP_MAXVERSION) --app-name "$(MOZ_APP_DISPLAYNAME)" --l10n-basedir "$(L10NBASEDIR)" --defines $(LANGPACK_DEFINES) --input $(DIST)/xpi-stage/locale-$(AB_CD))
|
2017-09-16 13:41:57 +03:00
|
|
|
$(call py_action,zip,-C $(DIST)/xpi-stage/locale-$(AB_CD) -x **/*.manifest -x **/*.js -x **/*.ini $(LANGPACK_FILE) $(PKG_ZIP_DIRS) manifest.json)
|
2017-05-30 12:33:59 +03:00
|
|
|
|
2009-01-23 14:21:52 +03:00
|
|
|
# This variable is to allow the wget-en-US target to know which ftp server to download from
|
|
|
|
ifndef EN_US_BINARY_URL
|
|
|
|
EN_US_BINARY_URL = $(error You must set EN_US_BINARY_URL)
|
|
|
|
endif
|
2017-07-18 20:58:54 +03:00
|
|
|
# In taskcluster the installer comes from another location
|
|
|
|
ifndef EN_US_INSTALLER_BINARY_URL
|
|
|
|
EN_US_INSTALLER_BINARY_URL = $(EN_US_BINARY_URL)
|
|
|
|
endif
|
2009-01-23 14:21:52 +03:00
|
|
|
|
2016-09-08 22:55:57 +03:00
|
|
|
# Allow the overriding of PACKAGE format so we can get an EN_US build with a different
|
|
|
|
# PACKAGE format than we are creating l10n packages with.
|
|
|
|
EN_US_PACKAGE_NAME ?= $(PACKAGE)
|
2017-07-18 20:58:54 +03:00
|
|
|
EN_US_PKG_INST_BASENAME ?= $(PKG_INST_BASENAME)
|
2016-09-08 22:55:57 +03:00
|
|
|
|
2009-01-23 14:21:52 +03:00
|
|
|
# This make target allows us to wget the latest en-US binary from a specified website
|
|
|
|
# The make installers-% target needs the en-US binary in dist/
|
|
|
|
# and for the windows repackages we need the .installer.exe in dist/sea
|
|
|
|
wget-en-US:
|
|
|
|
ifndef WGET
|
|
|
|
$(error Wget not installed)
|
|
|
|
endif
|
2015-12-30 03:33:50 +03:00
|
|
|
$(NSINSTALL) -D $(ABS_DIST)/$(PKG_PATH)
|
2016-09-08 22:55:57 +03:00
|
|
|
(cd $(ABS_DIST)/$(PKG_PATH) && \
|
|
|
|
$(WGET) --no-cache -nv --no-iri -N -O $(PACKAGE) '$(EN_US_BINARY_URL)/$(EN_US_PACKAGE_NAME)')
|
|
|
|
@echo 'Downloaded $(EN_US_BINARY_URL)/$(EN_US_PACKAGE_NAME) to $(ABS_DIST)/$(PKG_PATH)/$(PACKAGE)'
|
2009-10-06 01:04:18 +04:00
|
|
|
ifdef RETRIEVE_WINDOWS_INSTALLER
|
2009-01-23 14:21:52 +03:00
|
|
|
ifeq ($(OS_ARCH), WINNT)
|
2015-12-30 03:33:50 +03:00
|
|
|
$(NSINSTALL) -D $(ABS_DIST)/$(PKG_INST_PATH)
|
2016-09-08 22:55:57 +03:00
|
|
|
(cd $(ABS_DIST)/$(PKG_INST_PATH) && \
|
2017-07-18 20:58:54 +03:00
|
|
|
$(WGET) --no-cache -nv --no-iri -N -O $(PKG_INST_BASENAME).exe '$(EN_US_INSTALLER_BINARY_URL)/$(PKG_PATH)$(EN_US_PKG_INST_BASENAME).exe')
|
|
|
|
@echo 'Downloaded $(EN_US_INSTALLER_BINARY_URL)/$(PKG_PATH)$(EN_US_PKG_INST_BASENAME).exe to $(ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe'
|
2009-01-23 14:21:52 +03:00
|
|
|
endif
|
2009-10-06 01:04:18 +04:00
|
|
|
endif
|
2009-06-25 20:31:06 +04:00
|
|
|
|
|
|
|
generate-snippet-%:
|
2010-08-19 12:28:05 +04:00
|
|
|
$(PYTHON) $(MOZILLA_DIR)/tools/update-packaging/generatesnippet.py \
|
2015-12-30 03:33:50 +03:00
|
|
|
--mar-path=$(ABS_DIST)/update \
|
2009-06-25 20:31:06 +04:00
|
|
|
--application-ini-file=$(STAGEDIST)/application.ini \
|
|
|
|
--locale=$* \
|
|
|
|
--product=$(MOZ_PKG_APPNAME) \
|
2009-12-17 02:34:28 +03:00
|
|
|
--platform=$(MOZ_PKG_PLATFORM) \
|
2009-06-25 20:31:06 +04:00
|
|
|
--download-base-URL=$(DOWNLOAD_BASE_URL) \
|
|
|
|
--verbose
|