|
@@ -1,440 +0,0 @@
|
|
-# HG changeset patch
|
|
|
|
-# User Mike Hommey <mh+mozilla@glandium.org>
|
|
|
|
-# Date 1593552872 0
|
|
|
|
-# Node ID 22a1bfea8f7b108e24ebfd6c2539bcd524f8326b
|
|
|
|
-# Parent 3e0248a432be89e7016e5ef81736d418f8cbc4f0
|
|
|
|
-Bug 1240930 - Move jar_maker to the misc tier. r=firefox-build-system-reviewers,geckoview-reviewers,rstewart,agi
|
|
|
|
-
|
|
|
|
-Because jar_maker is not in the libs tier, we also rename the libs-%
|
|
|
|
-targets for l10n repacks to l10n-%, which make it clearer what they are
|
|
|
|
-for.
|
|
|
|
-
|
|
|
|
-And because multilocale.txt is both a GeneratedFile and a file that is
|
|
|
|
-generated (and installed) via manual build rules, keeping it in the misc
|
|
|
|
-target actually breaks building in toolkit/locales during l10n repacks,
|
|
|
|
-so move it to libs for now.
|
|
|
|
-
|
|
|
|
-Differential Revision: https://phabricator.services.mozilla.com/D81766
|
|
|
|
-
|
|
|
|
-diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
|
|
|
|
---- a/browser/locales/Makefile.in
|
|
|
|
-+++ b/browser/locales/Makefile.in
|
|
|
|
-@@ -6,17 +6,17 @@
|
|
|
|
- include $(topsrcdir)/config/config.mk
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- SUBMAKEFILES += \
|
|
|
|
- $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
|
|
|
|
- $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
|
|
|
|
- $(NULL)
|
|
|
|
-
|
|
|
|
--# This makefile uses variable overrides from the libs-% target to
|
|
|
|
-+# This makefile uses variable overrides from the l10n-% 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)
|
|
|
|
-
|
|
|
|
-@@ -42,29 +42,29 @@ endif
|
|
|
|
- # Required for l10n.mk - defines a list of app sub dirs that should
|
|
|
|
- # be included in langpack xpis.
|
|
|
|
- DIST_SUBDIRS = $(DIST_SUBDIR)
|
|
|
|
-
|
|
|
|
- include $(topsrcdir)/config/rules.mk
|
|
|
|
-
|
|
|
|
- include $(topsrcdir)/toolkit/locales/l10n.mk
|
|
|
|
-
|
|
|
|
--libs-%: AB_CD=$*
|
|
|
|
--libs-%:
|
|
|
|
-+l10n-%: AB_CD=$*
|
|
|
|
-+l10n-%:
|
|
|
|
- $(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
|
|
|
|
- $(NSINSTALL) -D $(DIST)/install
|
|
|
|
-- @$(MAKE) -C ../../toolkit/locales libs-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
|
|
|
|
-+ @$(MAKE) -C ../../toolkit/locales l10n-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
|
|
|
|
- @$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
- @$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
- ifneq (,$(wildcard ../extensions/formautofill/locales))
|
|
|
|
- @$(MAKE) -C ../extensions/formautofill/locales AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
- endif
|
|
|
|
- @$(MAKE) -C ../../intl/locales AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
- @$(MAKE) -C ../../devtools/client/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
|
|
|
|
-- @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR)
|
|
|
|
-+ @$(MAKE) l10n AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR)
|
|
|
|
- @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
-
|
|
|
|
- chrome-%: AB_CD=$*
|
|
|
|
- chrome-%: IS_LANGUAGE_REPACK=1
|
|
|
|
- chrome-%:
|
|
|
|
- $(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
|
|
|
|
- @$(MAKE) -C ../../toolkit/locales chrome-$*
|
|
|
|
- @$(MAKE) -C ../../services/sync/locales chrome AB_CD=$*
|
|
|
|
-@@ -84,17 +84,17 @@ langpack: langpack-$(AB_CD)
|
|
|
|
-
|
|
|
|
- # This is a generic target that will make a langpack, repack ZIP (+tarball)
|
|
|
|
- # builds, and repack an installer if applicable. It is called from the
|
|
|
|
- # tinderbox scripts. Alter it with caution.
|
|
|
|
-
|
|
|
|
- installers-%: IS_LANGUAGE_REPACK=1
|
|
|
|
- installers-%:
|
|
|
|
- @$(MAKE) clobber-$*
|
|
|
|
-- @$(MAKE) libs-$*
|
|
|
|
-+ @$(MAKE) l10n-$*
|
|
|
|
- @$(MAKE) package-langpack-$*
|
|
|
|
- @$(MAKE) repackage-zip-$*
|
|
|
|
- ifeq (WINNT,$(OS_ARCH))
|
|
|
|
- @$(MAKE) package-win32-installer AB_CD=$*
|
|
|
|
- endif
|
|
|
|
- @echo 'repackaging done'
|
|
|
|
-
|
|
|
|
- ident:
|
|
|
|
-diff --git a/config/rules.mk b/config/rules.mk
|
|
|
|
---- a/config/rules.mk
|
|
|
|
-+++ b/config/rules.mk
|
|
|
|
-@@ -1223,22 +1223,26 @@ endif
|
|
|
|
- # no way langpacks will get packaged right, so error out.
|
|
|
|
- ifneq (,$(DIST_SUBDIR))
|
|
|
|
- ifndef XPI_ROOT_APPID
|
|
|
|
- $(error XPI_ROOT_APPID is not defined - langpacks will break.)
|
|
|
|
- endif
|
|
|
|
- endif
|
|
|
|
- endif
|
|
|
|
-
|
|
|
|
--libs realchrome:: $(FINAL_TARGET)/chrome
|
|
|
|
-+misc realchrome:: $(FINAL_TARGET)/chrome
|
|
|
|
- $(call py_action,jar_maker,\
|
|
|
|
- $(QUIET) -d $(FINAL_TARGET) \
|
|
|
|
- $(MAKE_JARS_FLAGS) $(DEFINES) $(ACDEFINES) \
|
|
|
|
- $(JAR_MANIFEST))
|
|
|
|
-
|
|
|
|
-+ifdef AB_CD
|
|
|
|
-+.PHONY: l10n
|
|
|
|
-+l10n: misc ;
|
|
|
|
-+endif
|
|
|
|
- endif
|
|
|
|
-
|
|
|
|
- endif
|
|
|
|
-
|
|
|
|
- # When you move this out of the tools tier, please remove the corresponding
|
|
|
|
- # hacks in recursivemake.py that check if Makefile.in sets the variable.
|
|
|
|
- ifneq ($(XPI_PKGNAME),)
|
|
|
|
- tools realchrome::
|
|
|
|
-diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
|
|
|
|
---- a/python/mozbuild/mozbuild/backend/recursivemake.py
|
|
|
|
-+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
|
|
|
|
-@@ -513,18 +513,16 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
|
- elif isinstance(obj, Defines):
|
|
|
|
- self._process_defines(obj, backend_file)
|
|
|
|
-
|
|
|
|
- elif isinstance(obj, GeneratedFile):
|
|
|
|
- if obj.required_before_compile:
|
|
|
|
- tier = 'export'
|
|
|
|
- elif obj.required_during_compile:
|
|
|
|
- tier = None
|
|
|
|
-- elif obj.localized:
|
|
|
|
-- tier = 'libs'
|
|
|
|
- else:
|
|
|
|
- tier = 'misc'
|
|
|
|
- if tier:
|
|
|
|
- self._no_skip[tier].add(backend_file.relobjdir)
|
|
|
|
-
|
|
|
|
- # Localized generated files can use {AB_CD} and {AB_rCD} in their
|
|
|
|
- # output paths.
|
|
|
|
- if obj.localized:
|
|
|
|
-@@ -616,17 +614,17 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
|
- # with a different locale as input. IS_LANGUAGE_REPACK will reliably be set
|
|
|
|
- # in this situation, so simply force the generation to run in that case.
|
|
|
|
- force=force,
|
|
|
|
- locale='--locale=$(AB_CD) ' if obj.localized else '',
|
|
|
|
- script=obj.script,
|
|
|
|
- method=obj.method))
|
|
|
|
-
|
|
|
|
- elif isinstance(obj, JARManifest):
|
|
|
|
-- self._no_skip['libs'].add(backend_file.relobjdir)
|
|
|
|
-+ self._no_skip['misc'].add(backend_file.relobjdir)
|
|
|
|
- backend_file.write('JAR_MANIFEST := %s\n' % obj.path.full_path)
|
|
|
|
-
|
|
|
|
- elif isinstance(obj, RustProgram):
|
|
|
|
- self._process_rust_program(obj, backend_file)
|
|
|
|
- # Hook the program into the compile graph.
|
|
|
|
- build_target = self._build_target_for_obj(obj)
|
|
|
|
- self._compile_graph[build_target]
|
|
|
|
-
|
|
|
|
-@@ -1497,16 +1495,19 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
|
- else:
|
|
|
|
- install_manifest.add_link(f.full_path, dest)
|
|
|
|
- else:
|
|
|
|
- install_manifest.add_optional_exists(dest)
|
|
|
|
- objdir_files.append(self._pretty_path(f, backend_file))
|
|
|
|
- install_location = '$(DEPTH)/%s' % mozpath.join(target, path)
|
|
|
|
- if objdir_files:
|
|
|
|
- tier = 'export' if obj.install_target == 'dist/include' else 'misc'
|
|
|
|
-+ # We cannot generate multilocale.txt during misc at the moment.
|
|
|
|
-+ if objdir_files[0] == 'multilocale.txt':
|
|
|
|
-+ tier = 'libs'
|
|
|
|
- self._add_install_target(backend_file, target_var, tier,
|
|
|
|
- install_location, objdir_files)
|
|
|
|
- if absolute_files:
|
|
|
|
- # Unfortunately, we can't use _add_install_target because on
|
|
|
|
- # Windows, the absolute file paths that we want to install
|
|
|
|
- # from often have spaces. So we write our own rule.
|
|
|
|
- self._no_skip['misc'].add(backend_file.relobjdir)
|
|
|
|
- backend_file.write('misc::\n%s\n' %
|
|
|
|
-@@ -1555,37 +1556,37 @@ class RecursiveMakeBackend(CommonBackend
|
|
|
|
-
|
|
|
|
- def _process_localized_files(self, obj, files, backend_file):
|
|
|
|
- target = obj.install_target
|
|
|
|
- path = mozpath.basedir(target, ('dist/bin', ))
|
|
|
|
- if not path:
|
|
|
|
- raise Exception('Cannot install localized files to ' + target)
|
|
|
|
- for i, (path, files) in enumerate(files.walk()):
|
|
|
|
- name = 'LOCALIZED_FILES_%d' % i
|
|
|
|
-- self._no_skip['libs'].add(backend_file.relobjdir)
|
|
|
|
-+ self._no_skip['misc'].add(backend_file.relobjdir)
|
|
|
|
- self._write_localized_files_files(files, name + '_FILES', backend_file)
|
|
|
|
- # Use FINAL_TARGET here because some l10n repack rules set
|
|
|
|
- # XPI_NAME to generate langpacks.
|
|
|
|
- backend_file.write('%s_DEST = $(FINAL_TARGET)/%s\n' % (name, path))
|
|
|
|
-- backend_file.write('%s_TARGET := libs\n' % name)
|
|
|
|
-+ backend_file.write('%s_TARGET := misc\n' % name)
|
|
|
|
- backend_file.write('INSTALL_TARGETS += %s\n' % name)
|
|
|
|
-
|
|
|
|
- def _process_localized_pp_files(self, obj, files, backend_file):
|
|
|
|
- target = obj.install_target
|
|
|
|
- path = mozpath.basedir(target, ('dist/bin', ))
|
|
|
|
- if not path:
|
|
|
|
- raise Exception('Cannot install localized files to ' + target)
|
|
|
|
- for i, (path, files) in enumerate(files.walk()):
|
|
|
|
- name = 'LOCALIZED_PP_FILES_%d' % i
|
|
|
|
-- self._no_skip['libs'].add(backend_file.relobjdir)
|
|
|
|
-+ self._no_skip['misc'].add(backend_file.relobjdir)
|
|
|
|
- self._write_localized_files_files(files, name, backend_file)
|
|
|
|
- # Use FINAL_TARGET here because some l10n repack rules set
|
|
|
|
- # XPI_NAME to generate langpacks.
|
|
|
|
- backend_file.write('%s_PATH = $(FINAL_TARGET)/%s\n' % (name, path))
|
|
|
|
-- backend_file.write('%s_TARGET := libs\n' % name)
|
|
|
|
-+ backend_file.write('%s_TARGET := misc\n' % name)
|
|
|
|
- # Localized files will have different content in different
|
|
|
|
- # localizations, and some preprocessed files may not have
|
|
|
|
- # any preprocessor directives.
|
|
|
|
- backend_file.write('%s_FLAGS := --silence-missing-directive-warnings\n' % name)
|
|
|
|
- backend_file.write('PP_TARGETS += %s\n' % name)
|
|
|
|
-
|
|
|
|
- def _process_objdir_files(self, obj, files, backend_file):
|
|
|
|
- # We can't use an install manifest for the root of the objdir, since it
|
|
|
|
-diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
|
|
|
|
---- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
|
|
|
|
-+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
|
|
|
|
-@@ -454,54 +454,54 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
|
- def test_localized_generated_files(self):
|
|
|
|
- """Ensure LOCALIZED_GENERATED_FILES is handled properly."""
|
|
|
|
- env = self._consume('localized-generated-files', RecursiveMakeBackend)
|
|
|
|
-
|
|
|
|
- backend_path = mozpath.join(env.topobjdir, 'backend.mk')
|
|
|
|
- lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
|
|
|
|
-
|
|
|
|
- expected = [
|
|
|
|
-- 'libs:: $(MDDEPDIR)/foo.xyz.stub',
|
|
|
|
-+ 'misc:: $(MDDEPDIR)/foo.xyz.stub',
|
|
|
|
- 'foo.xyz: $(MDDEPDIR)/foo.xyz.stub ;',
|
|
|
|
- 'GARBAGE += foo.xyz',
|
|
|
|
- 'GARBAGE += $(MDDEPDIR)/foo.xyz.stub',
|
|
|
|
- 'EXTRA_MDDEPEND_FILES += foo.xyz.pp',
|
|
|
|
- '$(MDDEPDIR)/foo.xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
|
|
|
|
- '$(REPORT_BUILD)',
|
|
|
|
- '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo.xyz $(MDDEPDIR)/foo.xyz.pp $(MDDEPDIR)/foo.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
|
|
|
|
- '@$(TOUCH) $@',
|
|
|
|
- '',
|
|
|
|
- 'LOCALIZED_FILES_0_FILES += foo.xyz',
|
|
|
|
- 'LOCALIZED_FILES_0_DEST = $(FINAL_TARGET)/',
|
|
|
|
-- 'LOCALIZED_FILES_0_TARGET := libs',
|
|
|
|
-+ 'LOCALIZED_FILES_0_TARGET := misc',
|
|
|
|
- 'INSTALL_TARGETS += LOCALIZED_FILES_0',
|
|
|
|
- ]
|
|
|
|
-
|
|
|
|
- self.maxDiff = None
|
|
|
|
- self.assertEqual(lines, expected)
|
|
|
|
-
|
|
|
|
- def test_localized_generated_files_force(self):
|
|
|
|
- """Ensure LOCALIZED_GENERATED_FILES with .force is handled properly."""
|
|
|
|
- env = self._consume('localized-generated-files-force', RecursiveMakeBackend)
|
|
|
|
-
|
|
|
|
- backend_path = mozpath.join(env.topobjdir, 'backend.mk')
|
|
|
|
- lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
|
|
|
|
-
|
|
|
|
- expected = [
|
|
|
|
-- 'libs:: $(MDDEPDIR)/foo.xyz.stub',
|
|
|
|
-+ 'misc:: $(MDDEPDIR)/foo.xyz.stub',
|
|
|
|
- 'foo.xyz: $(MDDEPDIR)/foo.xyz.stub ;',
|
|
|
|
- 'GARBAGE += foo.xyz',
|
|
|
|
- 'GARBAGE += $(MDDEPDIR)/foo.xyz.stub',
|
|
|
|
- 'EXTRA_MDDEPEND_FILES += foo.xyz.pp',
|
|
|
|
- '$(MDDEPDIR)/foo.xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
|
|
|
|
- '$(REPORT_BUILD)',
|
|
|
|
- '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo.xyz $(MDDEPDIR)/foo.xyz.pp $(MDDEPDIR)/foo.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
|
|
|
|
- '@$(TOUCH) $@',
|
|
|
|
- '',
|
|
|
|
-- 'libs:: $(MDDEPDIR)/abc.xyz.stub',
|
|
|
|
-+ 'misc:: $(MDDEPDIR)/abc.xyz.stub',
|
|
|
|
- 'abc.xyz: $(MDDEPDIR)/abc.xyz.stub ;',
|
|
|
|
- 'GARBAGE += abc.xyz',
|
|
|
|
- 'GARBAGE += $(MDDEPDIR)/abc.xyz.stub',
|
|
|
|
- 'EXTRA_MDDEPEND_FILES += abc.xyz.pp',
|
|
|
|
- '$(MDDEPDIR)/abc.xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input FORCE' % env.topsrcdir,
|
|
|
|
- '$(REPORT_BUILD)',
|
|
|
|
- '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main abc.xyz $(MDDEPDIR)/abc.xyz.pp $(MDDEPDIR)/abc.xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
|
|
|
|
- + '@$(TOUCH) $@',
|
|
|
|
-@@ -515,17 +515,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
|
- """Ensure LOCALIZED_GENERATED_FILES is handled properly
|
|
|
|
- when {AB_CD} and {AB_rCD} are used."""
|
|
|
|
- env = self._consume('localized-generated-files-AB_CD', RecursiveMakeBackend)
|
|
|
|
-
|
|
|
|
- backend_path = mozpath.join(env.topobjdir, 'backend.mk')
|
|
|
|
- lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
|
|
|
|
-
|
|
|
|
- expected = [
|
|
|
|
-- 'libs:: $(MDDEPDIR)/foo$(AB_CD).xyz.stub',
|
|
|
|
-+ 'misc:: $(MDDEPDIR)/foo$(AB_CD).xyz.stub',
|
|
|
|
- 'foo$(AB_CD).xyz: $(MDDEPDIR)/foo$(AB_CD).xyz.stub ;',
|
|
|
|
- 'GARBAGE += foo$(AB_CD).xyz',
|
|
|
|
- 'GARBAGE += $(MDDEPDIR)/foo$(AB_CD).xyz.stub',
|
|
|
|
- 'EXTRA_MDDEPEND_FILES += foo$(AB_CD).xyz.pp',
|
|
|
|
- '$(MDDEPDIR)/foo$(AB_CD).xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input $(if $(IS_LANGUAGE_REPACK),FORCE)' % env.topsrcdir,
|
|
|
|
- '$(REPORT_BUILD)',
|
|
|
|
- '$(call py_action,file_generate,--locale=$(AB_CD) %s/generate-foo.py main foo$(AB_CD).xyz $(MDDEPDIR)/foo$(AB_CD).xyz.pp $(MDDEPDIR)/foo$(AB_CD).xyz.stub $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input)' % env.topsrcdir,
|
|
|
|
- '@$(TOUCH) $@',
|
|
|
|
-@@ -976,17 +976,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
|
- backend_path = mozpath.join(env.topobjdir, 'backend.mk')
|
|
|
|
- lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
|
|
|
|
-
|
|
|
|
- expected = [
|
|
|
|
- 'LOCALIZED_FILES_0_FILES += $(wildcard $(LOCALE_SRCDIR)/abc/*.abc)',
|
|
|
|
- 'LOCALIZED_FILES_0_FILES += $(call MERGE_FILE,bar.ini)',
|
|
|
|
- 'LOCALIZED_FILES_0_FILES += $(call MERGE_FILE,foo.js)',
|
|
|
|
- 'LOCALIZED_FILES_0_DEST = $(FINAL_TARGET)/',
|
|
|
|
-- 'LOCALIZED_FILES_0_TARGET := libs',
|
|
|
|
-+ 'LOCALIZED_FILES_0_TARGET := misc',
|
|
|
|
- 'INSTALL_TARGETS += LOCALIZED_FILES_0',
|
|
|
|
- ]
|
|
|
|
-
|
|
|
|
- found = [str for str in lines if 'LOCALIZED_FILES' in str]
|
|
|
|
- self.assertEqual(found, expected)
|
|
|
|
-
|
|
|
|
- def test_localized_pp_files(self):
|
|
|
|
- """Test that LOCALIZED_PP_FILES is written to backend.mk correctly."""
|
|
|
|
-@@ -994,17 +994,17 @@ class TestRecursiveMakeBackend(BackendTe
|
|
|
|
-
|
|
|
|
- backend_path = mozpath.join(env.topobjdir, 'backend.mk')
|
|
|
|
- lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
|
|
|
|
-
|
|
|
|
- expected = [
|
|
|
|
- 'LOCALIZED_PP_FILES_0 += $(call MERGE_FILE,bar.ini)',
|
|
|
|
- 'LOCALIZED_PP_FILES_0 += $(call MERGE_FILE,foo.js)',
|
|
|
|
- 'LOCALIZED_PP_FILES_0_PATH = $(FINAL_TARGET)/',
|
|
|
|
-- 'LOCALIZED_PP_FILES_0_TARGET := libs',
|
|
|
|
-+ 'LOCALIZED_PP_FILES_0_TARGET := misc',
|
|
|
|
- 'LOCALIZED_PP_FILES_0_FLAGS := --silence-missing-directive-warnings',
|
|
|
|
- 'PP_TARGETS += LOCALIZED_PP_FILES_0',
|
|
|
|
- ]
|
|
|
|
-
|
|
|
|
- found = [str for str in lines if 'LOCALIZED_PP_FILES' in str]
|
|
|
|
- self.assertEqual(found, expected)
|
|
|
|
-
|
|
|
|
- def test_config(self):
|
|
|
|
-diff --git a/toolkit/locales/Makefile.in b/toolkit/locales/Makefile.in
|
|
|
|
---- a/toolkit/locales/Makefile.in
|
|
|
|
-+++ b/toolkit/locales/Makefile.in
|
|
|
|
-@@ -1,21 +1,21 @@
|
|
|
|
- # 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/.
|
|
|
|
-
|
|
|
|
- include $(topsrcdir)/config/rules.mk
|
|
|
|
-
|
|
|
|
--libs-%: AB_CD=$*
|
|
|
|
--libs-%:
|
|
|
|
-- @$(MAKE) -C ../../netwerk/locales/ libs AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
-- @$(MAKE) -C ../../dom/locales/ libs AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
-- @$(MAKE) -C ../../security/manager/locales/ libs AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
-- @$(MAKE) -C ../../devtools/shared/locales/ libs AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
-- @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
-+l10n-%: AB_CD=$*
|
|
|
|
-+l10n-%:
|
|
|
|
-+ @$(MAKE) -C ../../netwerk/locales/ l10n AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
-+ @$(MAKE) -C ../../dom/locales/ l10n AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
-+ @$(MAKE) -C ../../security/manager/locales/ l10n AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
-+ @$(MAKE) -C ../../devtools/shared/locales/ l10n AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
-+ @$(MAKE) l10n AB_CD=$* XPI_NAME=locale-$*
|
|
|
|
-
|
|
|
|
- # target to be used by multi-locale l10n builds, just add this locale
|
|
|
|
- # like regular chrome code
|
|
|
|
- chrome-%: AB_CD=$*
|
|
|
|
- chrome-%:
|
|
|
|
- @$(MAKE) -C $(DEPTH)/netwerk/locales/ chrome AB_CD=$*
|
|
|
|
- @$(MAKE) -C $(DEPTH)/dom/locales/ chrome AB_CD=$*
|
|
|
|
- @$(MAKE) -C $(DEPTH)/security/manager/locales/ chrome AB_CD=$*
|
|
|
|
-diff --git a/toolkit/locales/l10n.mk b/toolkit/locales/l10n.mk
|
|
|
|
---- a/toolkit/locales/l10n.mk
|
|
|
|
-+++ b/toolkit/locales/l10n.mk
|
|
|
|
-@@ -3,18 +3,18 @@
|
|
|
|
- # 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/.
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- # 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
|
|
|
|
-+# l10n-%
|
|
|
|
-+# This target should call into the various l10n 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
|
|
|
|
-@@ -22,17 +22,17 @@
|
|
|
|
- # The installer-% targets should not set AB_CD, so that the unpackaging
|
|
|
|
- # step finds the original package.
|
|
|
|
- # The including makefile should provide values for the variables
|
|
|
|
- # MOZ_APP_VERSION and MOZ_LANGPACK_EID.
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- run_for_effects := $(shell if test ! -d $(DIST); then $(NSINSTALL) -D $(DIST); fi)
|
|
|
|
-
|
|
|
|
--# This makefile uses variable overrides from the libs-% target to
|
|
|
|
-+# This makefile uses variable overrides from the l10n-% target to
|
|
|
|
- # build non-default locales to non-default dist/ locations. Be aware!
|
|
|
|
-
|
|
|
|
- LPROJ_ROOT = $(firstword $(subst -, ,$(AB_CD)))
|
|
|
|
- ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
- ifeq (zh-TW,$(AB_CD))
|
|
|
|
- LPROJ_ROOT := $(subst -,_,$(AB_CD))
|
|
|
|
- endif
|
|
|
|
- endif
|
|
|
|
-@@ -197,17 +197,17 @@ endif
|
|
|
|
- -$(MOZILLA_DIR)/mach compare-locales $(COMPARE_LOCALES_DEFINES) --merge $(BASE_MERGE) $(srcdir)/l10n.toml $(L10NBASEDIR) $*
|
|
|
|
-
|
|
|
|
- langpack-%: IS_LANGUAGE_REPACK=1
|
|
|
|
- langpack-%: IS_LANGPACK=1
|
|
|
|
- langpack-%: libs-%
|
|
|
|
- langpack-%: AB_CD=$*
|
|
|
|
- langpack-%:
|
|
|
|
- @echo 'Making langpack $(LANGPACK_FILE)'
|
|
|
|
-- @$(MAKE) libs-$(AB_CD)
|
|
|
|
-+ @$(MAKE) l10n-$(AB_CD)
|
|
|
|
- @$(MAKE) package-langpack-$(AB_CD)
|
|
|
|
-
|
|
|
|
- package-langpack-%: LANGPACK_FILE=$(ABS_DIST)/$(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
|
|
|
|
- package-langpack-%: XPI_NAME=locale-$*
|
|
|
|
- package-langpack-%: AB_CD=$*
|
|
|
|
- package-langpack-%:
|
|
|
|
- @echo 'Making langpack $(LANGPACK_FILE)'
|
|
|
|
- $(NSINSTALL) -D $(DIST)/$(PKG_LANGPACK_PATH)
|
|
|