Bug 1240930 - Move jar_maker to the misc tier. r=firefox-build-system-reviewers,geckoview-reviewers,rstewart,agi
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 30 Jun 2020 21:34:32 +0000
changeset 538118 22a1bfea8f7b108e24ebfd6c2539bcd524f8326b
parent 538117 3e0248a432be89e7016e5ef81736d418f8cbc4f0
child 538119 6debf3390ba2274e7eddb5830b45fd31088de6b8
push id37557
push userabutkovits@mozilla.com
push dateWed, 01 Jul 2020 03:27:11 +0000
treeherdermozilla-central@f0e47b29f8c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirefox-build-system-reviewers, geckoview-reviewers, rstewart, agi
bugs1240930
milestone80.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
browser/locales/Makefile.in
build/docs/locales.rst
config/rules.mk
mobile/android/locales/Makefile.in
mobile/locales/Makefile.in
python/mozbuild/mozbuild/backend/recursivemake.py
python/mozbuild/mozbuild/test/backend/test_recursivemake.py
toolkit/locales/Makefile.in
toolkit/locales/l10n.mk
--- 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)
 
@@ -46,30 +46,30 @@ 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 ../extensions/report-site-issue/locales AB_CD=$* XPI_NAME=locale-$*
 	@$(MAKE) -C ../../devtools/client/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
 	@$(MAKE) -C ../../devtools/startup/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) multilocale.txt-$* AB_CD=$* XPI_NAME=locale-$*
 	@$(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-$*
@@ -91,17 +91,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:
--- a/build/docs/locales.rst
+++ b/build/docs/locales.rst
@@ -110,22 +110,22 @@ General flow of repacks
 
 The general flow of the locale repacks is controlled by
 ``$MOZ_BUILD_APP/locales/Makefile.in`` and ``toolkit/locales/l10n.mk``, plus
 the packaging build system. The three main entry points above all trigger
 related build flows:
 
 #. Get the localization repository, if needed
 #. Run l10n-merge with a prior clobber of the merge dir
-#. Copy l10n files to ``dist``, with minor differences here between ``libs-%`` and ``chrome-%``
+#. Copy l10n files to ``dist``, with minor differences here between ``l10n-%`` and ``chrome-%``
 #. Repackage and package
 
 Details on l10n-merge are described in its own section below.
 The copying of files is mainly controlled by ``jar.mn``, in the few source
-directories that include localizable files. ``libs-%`` is used for repacks,
+directories that include localizable files. ``l10n-%`` is used for repacks,
 ``chrome-%`` for multi-locale packages. The repackaging is dedicated
 Python code in ``toolkit/mozapps/installer/l10n-repack.py``, using an existing
 package. It strips existing ``chrome`` l10n resources, and adds localizations
 and metadata.
 
 Language packs don't require repackaging. The windows installers are generated
 by merely packaging an existing repackaged zip into to an installer.
 
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -931,22 +931,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::
--- a/mobile/android/locales/Makefile.in
+++ b/mobile/android/locales/Makefile.in
@@ -28,21 +28,21 @@ include $(topsrcdir)/toolkit/locales/l10
 
 # For historical reasons, kill stage for repacks due to library moves
 # in PACKAGE and UNPACKAGE.
 clobber-stage:
 	$(RM) -rf $(STAGEDIST)
 
 # merge if we're not en-US, using conditional function as we need
 # the current value of AB_CD
-libs-%: AB_CD=$*
-libs-%:
+l10n-%: AB_CD=$*
+l10n-%:
 	$(if $(filter en-US,$(AB_CD)),, $(MAKE) merge-$*)
-	$(MAKE) -C $(DEPTH)/mobile/locales libs-$*
-	$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
+	$(MAKE) -C $(DEPTH)/mobile/locales l10n-$*
+	$(MAKE) l10n AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
 	$(MAKE) multilocale.txt-$* AB_CD=$* XPI_NAME=locale-$*
 
 # Tailored target to just add the chrome processing for multi-locale builds
 # merge if we're not en-US, using conditional function as we need
 # the current value of AB_CD
 chrome-%: AB_CD=$*
 chrome-%: IS_LANGUAGE_REPACK=1
 chrome-%:
@@ -53,17 +53,17 @@ chrome-%:
 langpack: langpack-$(AB_CD)
 
 # This is a generic target that will make a langpack and repack tarball
 # builds. It is called from the tinderbox scripts. Alter it with caution.
 
 installers-%: IS_LANGUAGE_REPACK=1
 installers-%:
 	$(MAKE) clobber-stage
-	$(MAKE) libs-$*
+	$(MAKE) l10n-$*
 	$(MAKE) package-langpack-$*
 	$(MAKE) repackage-zip-$*
 	@echo 'repackaging done'
 
 # When we unpack fennec on MacOS X the platform.ini and application.ini are in slightly
 # different locations that on all other platforms
 ifeq (Darwin, $(OS_ARCH))
 GECKO_PLATFORM_INI_PATH='$(STAGEDIST)/platform.ini'
--- a/mobile/locales/Makefile.in
+++ b/mobile/locales/Makefile.in
@@ -11,20 +11,20 @@ include $(topsrcdir)/config/makefiles/ma
 $(call errorIfEmpty,MOZ_BRANDING_DIRECTORY)
 SUBMAKEFILES += \
         $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
         $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
         $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
-libs-%: AB_CD=$*
-libs-%:
+l10n-%: AB_CD=$*
+l10n-%:
 	$(NSINSTALL) -D $(DIST)/install
-	@$(MAKE) -C $(DEPTH)/toolkit/locales libs-$*
-	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
+	@$(MAKE) -C $(DEPTH)/toolkit/locales l10n-$*
+	@$(MAKE) l10n AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
 
 # Tailored target to just add the chrome processing for multi-locale builds
 chrome-%: AB_CD=$*
 chrome-%:
 	@$(MAKE) chrome AB_CD=$*
 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales chrome AB_CD=$*
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -393,17 +393,18 @@ class RecursiveMakeBackend(MakeBackend):
         summary = super(RecursiveMakeBackend, self).summary()
         summary.extend('; {makefile_in:d} -> {makefile_out:d} Makefile',
                        makefile_in=self._makefile_in_count,
                        makefile_out=self._makefile_out_count)
         return summary
 
     def _get_backend_file_for(self, obj):
         # For generated files that we put in the export or misc tiers, we use the
-        # top-level backend file.
+        # top-level backend file, except for localized files, which we need to keep
+        # in each directory for dependencies from jar manifests for l10n repacks.
         if isinstance(obj, GeneratedFile) and not obj.required_during_compile and \
                 not obj.localized:
             objdir = self.environment.topobjdir
         else:
             objdir = obj.objdir
 
         if objdir not in self._backend_files:
             self._backend_files[objdir] = \
@@ -541,18 +542,16 @@ class RecursiveMakeBackend(MakeBackend):
         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:
                 relobjdir = mozpath.relpath(obj.objdir, self.environment.topobjdir)
                 self._no_skip[tier].add(relobjdir)
             backend_file.write_once('include $(topsrcdir)/config/AB_rCD.mk\n')
             relobjdir = mozpath.relpath(obj.objdir, backend_file.objdir)
             # For generated files that we handle in the top-level backend file,
@@ -560,17 +559,17 @@ class RecursiveMakeBackend(MakeBackend):
             # For the others, we want a `tier` target.
             if tier and relobjdir:
                 tier = '%s/%s' % (relobjdir, tier)
             for stmt in self._format_statements_for_generated_file(
                     obj, tier, extra_dependencies='backend.mk' if obj.flags else ''):
                 backend_file.write(stmt + '\n')
 
         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]
             self._rust_targets.add(build_target)
@@ -1482,16 +1481,19 @@ class RecursiveMakeBackend(MakeBackend):
                     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' %
@@ -1540,37 +1542,37 @@ class RecursiveMakeBackend(MakeBackend):
 
     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
--- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
@@ -470,55 +470,55 @@ class TestRecursiveMakeBackend(BackendTe
         """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 = [
             'include $(topsrcdir)/config/AB_rCD.mk',
-            '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 += $(MDDEPDIR)/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,  # noqa
             '$(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,  # noqa
             '@$(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 = [
             'include $(topsrcdir)/config/AB_rCD.mk',
-            '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 += $(MDDEPDIR)/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,  # noqa
             '$(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,  # noqa
             '@$(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 += $(MDDEPDIR)/abc.xyz.pp',
             '$(MDDEPDIR)/abc.xyz.stub: %s/generate-foo.py $(call MERGE_FILE,localized-input) $(srcdir)/non-localized-input FORCE' % env.topsrcdir,  # noqa
             '$(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,  # noqa
             '@$(TOUCH) $@',
@@ -533,17 +533,17 @@ class TestRecursiveMakeBackend(BackendTe
         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 = [
             'include $(topsrcdir)/config/AB_rCD.mk',
-            '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 += $(MDDEPDIR)/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,  # noqa
             '$(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,  # noqa
             '@$(TOUCH) $@',
@@ -989,17 +989,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."""
@@ -1007,17 +1007,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):
--- 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=$*
--- 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
@@ -209,28 +209,28 @@ ifdef NIGHTLY_BUILD
 endif
 	$(RM) -rf $(REAL_LOCALE_MERGEDIR)
 	-$(MOZILLA_DIR)/mach compare-locales --merge $(BASE_MERGE) $(srcdir)/l10n.toml $(L10NBASEDIR) $*
 # Hunspell dictionaries are interesting, as we don't ship the en-US
 # dictionary in repacks. Thus we can't use the merge logic from
 # compare-locales above, which would add en-US.dic and en-US.aff to
 # the merge directory.
 # Copy them to the merge dir, if exist. The repackaged app can still decide
-# on whether to package them or not in `libs-%` and `chrome-%`.
+# on whether to package them or not in `l10n-%` and `chrome-%`.
 	if  test -d $(L10NBASEDIR)/$(AB_CD)/extensions/spellcheck ; then \
 		$(NSINSTALL) -D $(REAL_LOCALE_MERGEDIR)/extensions/spellcheck/hunspell ; \
 		cp $(L10NBASEDIR)/$(AB_CD)/extensions/spellcheck/hunspell/*.* $(REAL_LOCALE_MERGEDIR)/extensions/spellcheck/hunspell ; \
 	fi
 
 langpack-%: IS_LANGUAGE_REPACK=1
 langpack-%: IS_LANGPACK=1
 langpack-%: AB_CD=$*
 langpack-%: clobber-%
 	@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-%:
 	$(NSINSTALL) -D $(DIST)/$(PKG_LANGPACK_PATH)
 	$(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) --langpack-eid '$(MOZ_LANGPACK_EID)' --input $(DIST)/xpi-stage/locale-$(AB_CD))