Bug 897458 - Move EXTRA_PP_JS_MODULES to moz.build; r=gps
authorMs2ger <ms2ger@gmail.com>
Fri, 02 Aug 2013 09:03:25 +0200
changeset 154109 811f66038c9364680f2d3c301ba408898c2b0fcc
parent 154108 2ba2c2534fdbb747c4718b7332876e68d9563aa9
child 154110 f2528126addb5804de1b3ebfce42f164fb1c7a62
push id382
push userakeybl@mozilla.com
push dateMon, 21 Oct 2013 21:47:13 +0000
treeherdermozilla-release@5f1868ee45cb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs897458
milestone25.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 897458 - Move EXTRA_PP_JS_MODULES to moz.build; r=gps
browser/components/migration/src/Makefile.in
browser/components/migration/src/moz.build
browser/components/sessionstore/src/Makefile.in
browser/components/sessionstore/src/moz.build
browser/modules/Makefile.in
browser/modules/moz.build
config/rules.mk
dom/apps/src/Makefile.in
dom/apps/src/moz.build
dom/identity/Makefile.in
dom/identity/moz.build
dom/phonenumberutils/Makefile.in
dom/phonenumberutils/moz.build
js/src/config/rules.mk
python/mozbuild/mozbuild/frontend/emitter.py
python/mozbuild/mozbuild/frontend/sandbox_symbols.py
python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build
python/mozbuild/mozbuild/test/backend/test_recursivemake.py
python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build
python/mozbuild/mozbuild/test/frontend/test_emitter.py
services/metrics/Makefile.in
services/metrics/moz.build
toolkit/components/jsdownloads/src/Makefile.in
toolkit/components/jsdownloads/src/moz.build
toolkit/components/osfile/Makefile.in
toolkit/components/osfile/moz.build
toolkit/components/places/Makefile.in
toolkit/components/places/moz.build
toolkit/components/satchel/Makefile.in
toolkit/components/satchel/moz.build
toolkit/modules/Makefile.in
toolkit/modules/moz.build
toolkit/mozapps/downloads/Makefile.in
toolkit/mozapps/downloads/moz.build
toolkit/mozapps/extensions/Makefile.in
toolkit/mozapps/extensions/moz.build
toolkit/webapps/Makefile.in
toolkit/webapps/moz.build
--- a/browser/components/migration/src/Makefile.in
+++ b/browser/components/migration/src/Makefile.in
@@ -17,14 +17,10 @@ ifeq ($(OS_ARCH),WINNT)
 
 DEFINES += -DHAS_IE_MIGRATOR -DHAS_SAFARI_MIGRATOR
 endif
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 DEFINES += -DHAS_SAFARI_MIGRATOR
 endif
 
-EXTRA_PP_JS_MODULES = \
-	MigrationUtils.jsm \
-	$(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
--- a/browser/components/migration/src/moz.build
+++ b/browser/components/migration/src/moz.build
@@ -33,8 +33,12 @@ if CONFIG['OS_ARCH'] == 'WINNT':
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     EXTRA_PP_COMPONENTS += [
         'SafariProfileMigrator.js',
     ]
 
 LIBRARY_NAME = 'migration_s'
 
+EXTRA_PP_JS_MODULES += [
+    'MigrationUtils.jsm',
+]
+
deleted file mode 100644
--- a/browser/components/sessionstore/src/Makefile.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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/.
-
-DEPTH     = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-VPATH     = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-include $(topsrcdir)/config/config.mk
-
-EXTRA_PP_JS_MODULES := \
-	SessionStore.jsm \
-	$(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/browser/components/sessionstore/src/moz.build
+++ b/browser/components/sessionstore/src/moz.build
@@ -15,8 +15,13 @@ JS_MODULES_PATH = 'modules/sessionstore'
 EXTRA_JS_MODULES = [
     'DocumentUtils.jsm',
     'SessionMigration.jsm',
     'SessionStorage.jsm',
     'SessionWorker.js',
     'XPathGenerator.jsm',
     '_SessionFile.jsm',
 ]
+
+EXTRA_PP_JS_MODULES += [
+    'SessionStore.jsm',
+]
+
--- a/browser/modules/Makefile.in
+++ b/browser/modules/Makefile.in
@@ -6,18 +6,13 @@ DEPTH   = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH   = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 include $(topsrcdir)/config/config.mk
 
-EXTRA_PP_JS_MODULES = \
-	AboutHomeUtils.jsm \
-	RecentWindow.jsm \
-	$(NULL)
-
 ifdef MOZILLA_OFFICIAL
 DEFINES += -DMOZILLA_OFFICIAL=1
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/browser/modules/moz.build
+++ b/browser/modules/moz.build
@@ -19,8 +19,14 @@ EXTRA_JS_MODULES += [
     'webrtcUI.jsm',
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     EXTRA_JS_MODULES += [
         'WindowsJumpLists.jsm',
         'WindowsPreviewPerTab.jsm',
     ]
+
+EXTRA_PP_JS_MODULES += [
+    'AboutHomeUtils.jsm',
+    'RecentWindow.jsm',
+]
+
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -13,16 +13,17 @@ endif
 # Integrate with mozbuild-generated make files. We first verify that no
 # variables provided by the automatically generated .mk files are
 # present. If they are, this is a violation of the separation of
 # responsibility between Makefile.in and mozbuild files.
 _MOZBUILD_EXTERNAL_VARIABLES := \
   CPP_UNIT_TESTS \
   DIRS \
   EXTRA_PP_COMPONENTS \
+  EXTRA_PP_JS_MODULES \
   GTEST_CMMSRCS \
   GTEST_CPPSRCS \
   GTEST_CSRCS \
   HOST_CSRCS \
   HOST_LIBRARY_NAME \
   MODULE \
   NO_DIST_INSTALL \
   PARALLEL_DIRS \
deleted file mode 100644
--- a/dom/apps/src/Makefile.in
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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/.
-
-DEPTH     = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-VPATH     = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-
-EXTRA_PP_JS_MODULES += \
-  Webapps.jsm \
-  AppsUtils.jsm \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/apps/src/moz.build
+++ b/dom/apps/src/moz.build
@@ -17,8 +17,14 @@ EXTRA_PP_COMPONENTS += [
 EXTRA_JS_MODULES += [
     'AppDownloadManager.jsm',
     'AppsServiceChild.jsm',
     'FreeSpaceWatcher.jsm',
     'OfflineCacheInstaller.jsm',
     'PermissionsInstaller.jsm',
     'PermissionsTable.jsm',
 ]
+
+EXTRA_PP_JS_MODULES += [
+    'AppsUtils.jsm',
+    'Webapps.jsm',
+]
+
deleted file mode 100644
--- a/dom/identity/Makefile.in
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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/.
-
-DEPTH            = @DEPTH@
-topsrcdir        = @top_srcdir@
-srcdir           = @srcdir@
-VPATH            = @srcdir@
-
-relativesrcdir   = @relativesrcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-
-EXTRA_PP_JS_MODULES = \
-    DOMIdentity.jsm \
-    $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/identity/moz.build
+++ b/dom/identity/moz.build
@@ -6,8 +6,13 @@
 
 TEST_DIRS += ['tests']
 
 EXTRA_COMPONENTS += [
     'Identity.manifest',
     'nsDOMIdentity.js',
     'nsIDService.js',
 ]
+
+EXTRA_PP_JS_MODULES += [
+    'DOMIdentity.jsm',
+]
+
deleted file mode 100644
--- a/dom/phonenumberutils/Makefile.in
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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/.
-
-DEPTH     = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-VPATH     = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-EXTRA_PP_JS_MODULES = \
-  PhoneNumberUtils.jsm \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/phonenumberutils/moz.build
+++ b/dom/phonenumberutils/moz.build
@@ -7,8 +7,12 @@
 TEST_DIRS += ['tests']
 
 EXTRA_JS_MODULES += [
     'PhoneNumber.jsm',
     'PhoneNumberMetaData.jsm',
     'mcc_iso3166_table.jsm',
 ]
 
+EXTRA_PP_JS_MODULES += [
+    'PhoneNumberUtils.jsm',
+]
+
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -13,16 +13,17 @@ endif
 # Integrate with mozbuild-generated make files. We first verify that no
 # variables provided by the automatically generated .mk files are
 # present. If they are, this is a violation of the separation of
 # responsibility between Makefile.in and mozbuild files.
 _MOZBUILD_EXTERNAL_VARIABLES := \
   CPP_UNIT_TESTS \
   DIRS \
   EXTRA_PP_COMPONENTS \
+  EXTRA_PP_JS_MODULES \
   GTEST_CMMSRCS \
   GTEST_CPPSRCS \
   GTEST_CSRCS \
   HOST_CSRCS \
   HOST_LIBRARY_NAME \
   MODULE \
   NO_DIST_INSTALL \
   PARALLEL_DIRS \
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -84,16 +84,17 @@ class TreeMetadataEmitter(object):
             CMMSRCS='CMMSRCS',
             CPPSRCS='CPP_SOURCES',
             CPP_UNIT_TESTS='CPP_UNIT_TESTS',
             CSRCS='CSRCS',
             DEFINES='DEFINES',
             EXTRA_COMPONENTS='EXTRA_COMPONENTS',
             EXTRA_JS_MODULES='EXTRA_JS_MODULES',
             EXTRA_PP_COMPONENTS='EXTRA_PP_COMPONENTS',
+            EXTRA_PP_JS_MODULES='EXTRA_PP_JS_MODULES',
             GTEST_CMMSRCS='GTEST_CMM_SOURCES',
             GTEST_CPPSRCS='GTEST_CPP_SOURCES',
             GTEST_CSRCS='GTEST_C_SOURCES',
             HOST_CPPSRCS='HOST_CPPSRCS',
             HOST_CSRCS='HOST_CSRCS',
             HOST_LIBRARY_NAME='HOST_LIBRARY_NAME',
             JS_MODULES_PATH='JS_MODULES_PATH',
             LIBRARY_NAME='LIBRARY_NAME',
--- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
+++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
@@ -107,16 +107,24 @@ VARIABLES = {
     'EXTRA_JS_MODULES': (StrictOrderingOnAppendList, list, [],
         """Additional JavaScript files to distribute.
 
         This variable contains a list of files to copy into
         $(FINAL_TARGET)/$(JS_MODULES_PATH). JS_MODULES_PATH defaults to
         "modules" if left undefined.
         """),
 
+    'EXTRA_PP_JS_MODULES': (StrictOrderingOnAppendList, list, [],
+        """Additional JavaScript files to distribute.
+
+        This variable contains a list of files to copy into
+        $(FINAL_TARGET)/$(JS_MODULES_PATH), after preprocessing.
+        JS_MODULES_PATH defaults to "modules" if left undefined.
+        """),
+
     'EXTRA_PP_COMPONENTS': (StrictOrderingOnAppendList, list, [],
         """Javascript XPCOM files.
 
        This variable contains a list of files to preprocess.  Generated
        files will be installed in the /components directory of the distribution.
         """),
 
     'CPP_UNIT_TESTS': (StrictOrderingOnAppendList, list, [],
--- a/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build
+++ b/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build
@@ -8,16 +8,19 @@ XPIDL_FLAGS = ['-Idir1', '-Idir2', '-Idi
 
 ASFILES = ['bar.s', 'foo.asm']
 
 DEFINES = ['-Dbar', '-Dfoo']
 
 EXTRA_COMPONENTS = ['bar.js', 'foo.js']
 EXTRA_PP_COMPONENTS = ['bar.pp.js', 'foo.pp.js']
 
+EXTRA_JS_MODULES = ['bar.jsm', 'foo.jsm']
+EXTRA_PP_JS_MODULES = ['bar.pp.jsm', 'foo.pp.jsm']
+
 CPP_UNIT_TESTS = ['foo.cpp']
 
 GTEST_C_SOURCES = ['test1.c', 'test2.c']
 GTEST_CMM_SOURCES = ['test1.mm', 'test2.mm']
 GTEST_CPP_SOURCES = ['test1.cpp', 'test2.cpp']
 
 HOST_CPPSRCS = ['bar.cpp', 'foo.cpp']
 HOST_CSRCS = ['bar.c', 'foo.c']
--- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
@@ -161,16 +161,24 @@ class TestRecursiveMakeBackend(BackendTe
             'EXTRA_COMPONENTS': [
                 'EXTRA_COMPONENTS += bar.js',
                 'EXTRA_COMPONENTS += foo.js',
             ],
             'EXTRA_PP_COMPONENTS': [
                 'EXTRA_PP_COMPONENTS += bar.pp.js',
                 'EXTRA_PP_COMPONENTS += foo.pp.js',
             ],
+            'EXTRA_JS_MODULES': [
+                'EXTRA_JS_MODULES += bar.jsm',
+                'EXTRA_JS_MODULES += foo.jsm',
+            ],
+            'EXTRA_PP_JS_MODULES': [
+                'EXTRA_PP_JS_MODULES += bar.pp.jsm',
+                'EXTRA_PP_JS_MODULES += foo.pp.jsm',
+            ],
             'GTEST_CMMSRCS': [
                 'GTEST_CMMSRCS += test1.mm',
                 'GTEST_CMMSRCS += test2.mm',
             ],
             'GTEST_CPPSRCS': [
                 'GTEST_CPPSRCS += test1.cpp',
                 'GTEST_CPPSRCS += test2.cpp',
             ],
--- a/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build
+++ b/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build
@@ -8,16 +8,19 @@ XPIDL_FLAGS += ['-Idir1', '-Idir2', '-Id
 
 ASFILES += ['fans.asm', 'tans.s']
 
 DEFINES=['-Dfans', '-Dtans']
 
 EXTRA_COMPONENTS=['fans.js', 'tans.js']
 EXTRA_PP_COMPONENTS=['fans.pp.js', 'tans.pp.js']
 
+EXTRA_JS_MODULES = ['bar.jsm', 'foo.jsm']
+EXTRA_PP_JS_MODULES = ['bar.pp.jsm', 'foo.pp.jsm']
+
 CPP_UNIT_TESTS = ['foo.cpp']
 
 GTEST_C_SOURCES = ['test1.c', 'test2.c']
 GTEST_CMM_SOURCES = ['test1.mm', 'test2.mm']
 GTEST_CPP_SOURCES = ['test1.cpp', 'test2.cpp']
 
 HOST_CPPSRCS += ['fans.cpp', 'tans.cpp']
 HOST_CSRCS += ['fans.c', 'tans.c']
--- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
@@ -128,16 +128,18 @@ class TestEmitterBasic(unittest.TestCase
         wanted = dict(
             ASFILES=['fans.asm', 'tans.s'],
             CMMSRCS=['fans.mm', 'tans.mm'],
             CSRCS=['fans.c', 'tans.c'],
             CPP_UNIT_TESTS=['foo.cpp'],
             DEFINES=['-Dfans', '-Dtans'],
             EXTRA_COMPONENTS=['fans.js', 'tans.js'],
             EXTRA_PP_COMPONENTS=['fans.pp.js', 'tans.pp.js'],
+            EXTRA_JS_MODULES=['bar.jsm', 'foo.jsm'],
+            EXTRA_PP_JS_MODULES=['bar.pp.jsm', 'foo.pp.jsm'],
             GTEST_CSRCS=['test1.c', 'test2.c'],
             GTEST_CMMSRCS=['test1.mm', 'test2.mm'],
             GTEST_CPPSRCS=['test1.cpp', 'test2.cpp'],
             HOST_CPPSRCS=['fans.cpp', 'tans.cpp'],
             HOST_CSRCS=['fans.c', 'tans.c'],
             HOST_LIBRARY_NAME='host_fans',
             LIBRARY_NAME='lib_name',
             LIBS=['fans.lib', 'tans.lib'],
--- a/services/metrics/Makefile.in
+++ b/services/metrics/Makefile.in
@@ -4,33 +4,26 @@
 
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-modules := \
-  dataprovider.jsm \
-  providermanager.jsm \
-  storage.jsm \
-  $(NULL)
-
 testing_modules := \
   mocks.jsm \
   $(NULL)
 
 # We install Metrics.jsm into the "main" JSM repository and the rest in
 # services. External consumers should only go through Metrics.jsm.
 MAIN_JS_MODULE := Metrics.jsm
 MAIN_JS_MODULE_PATH = $(FINAL_TARGET)/modules
 PP_TARGETS += MAIN_JS_MODULE
 
-EXTRA_PP_JS_MODULES := $(modules)
 JS_MODULES_PATH = modules/services/metrics
 
 TESTING_JS_MODULES := $(addprefix modules-testing/,$(testing_modules))
 TESTING_JS_MODULE_DIR := services/metrics
 
 include $(topsrcdir)/config/rules.mk
 
 # Add extra prerequisites until bug 837792 is addressed.
--- a/services/metrics/moz.build
+++ b/services/metrics/moz.build
@@ -1,7 +1,14 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
 TEST_DIRS += ['tests']
+
+EXTRA_PP_JS_MODULES += [
+    'dataprovider.jsm',
+    'providermanager.jsm',
+    'storage.jsm',
+]
+
deleted file mode 100644
--- a/toolkit/components/jsdownloads/src/Makefile.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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/.
-
-DEPTH     = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-VPATH     = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-
-EXTRA_PP_JS_MODULES = \
-  DownloadIntegration.jsm \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/jsdownloads/src/moz.build
+++ b/toolkit/components/jsdownloads/src/moz.build
@@ -12,8 +12,12 @@ EXTRA_COMPONENTS += [
 EXTRA_JS_MODULES += [
     'DownloadCore.jsm',
     'DownloadList.jsm',
     'DownloadStore.jsm',
     'DownloadUIHelper.jsm',
     'Downloads.jsm',
 ]
 
+EXTRA_PP_JS_MODULES += [
+    'DownloadIntegration.jsm',
+]
+
--- a/toolkit/components/osfile/Makefile.in
+++ b/toolkit/components/osfile/Makefile.in
@@ -6,20 +6,16 @@ DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBXUL_LIBRARY  = 1
 
-EXTRA_PP_JS_MODULES = \
-   osfile.jsm \
-   $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 libs::
 	$(NSINSTALL) $(srcdir)/osfile_shared_allthreads.jsm $(FINAL_TARGET)/modules/osfile
 	$(NSINSTALL) $(srcdir)/osfile_unix_allthreads.jsm $(FINAL_TARGET)/modules/osfile
 	$(NSINSTALL) $(srcdir)/osfile_unix_back.jsm $(FINAL_TARGET)/modules/osfile
 	$(NSINSTALL) $(srcdir)/ospath_unix_back.jsm $(FINAL_TARGET)/modules/osfile
 	$(NSINSTALL) $(srcdir)/osfile_unix_front.jsm $(FINAL_TARGET)/modules/osfile
--- a/toolkit/components/osfile/moz.build
+++ b/toolkit/components/osfile/moz.build
@@ -5,8 +5,12 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['tests']
 
 MODULE = 'osfile'
 
 LIBRARY_NAME = 'osfile_s'
 
+EXTRA_PP_JS_MODULES += [
+    'osfile.jsm',
+]
+
--- a/toolkit/components/places/Makefile.in
+++ b/toolkit/components/places/Makefile.in
@@ -14,23 +14,12 @@ LIBRARY_NAME  = places
 MSVC_ENABLE_PGO := 1
 LIBXUL_LIBRARY = 1
 EXPORT_LIBRARY = 1
 MODULE_NAME = nsPlacesModule
 IS_COMPONENT = 1
 
 LOCAL_INCLUDES += -I$(srcdir)/../build
 
-
-ifdef MOZ_XUL
-endif
-
-EXTRA_PP_JS_MODULES = \
-  BookmarkHTMLUtils.jsm \
-  PlacesUtils.jsm \
-  $(NULL)
-
-include $(topsrcdir)/config/config.mk
-
 endif
 
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
--- a/toolkit/components/places/moz.build
+++ b/toolkit/components/places/moz.build
@@ -55,16 +55,21 @@ if CONFIG['MOZ_PLACES']:
         'BookmarkJSONUtils.jsm',
         'ClusterLib.js',
         'ColorAnalyzer_worker.js',
         'ColorConversion.js',
         'PlacesBackups.jsm',
         'PlacesDBUtils.jsm',
     ]
 
+    EXTRA_PP_JS_MODULES += [
+        'BookmarkHTMLUtils.jsm',
+        'PlacesUtils.jsm',
+    ]
+
 MODULE = 'places'
 
 
 if CONFIG['MOZ_PLACES']:
     EXTRA_COMPONENTS += [
         'ColorAnalyzer.js',
         'PlacesCategoriesStarter.js',
         'nsLivemarkService.js',
--- a/toolkit/components/satchel/Makefile.in
+++ b/toolkit/components/satchel/Makefile.in
@@ -14,13 +14,9 @@ IS_COMPONENT = 1
 LIBXUL_LIBRARY = 1
 EXPORT_LIBRARY = 1
 
 LOCAL_INCLUDES = \
   -I$(srcdir)/../build \
   $(NULL)
 
 
-EXTRA_PP_JS_MODULES = \
-  FormHistory.jsm \
-	$(NULL)
-
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/satchel/moz.build
+++ b/toolkit/components/satchel/moz.build
@@ -30,8 +30,13 @@ EXTRA_PP_COMPONENTS += [
     'nsFormHistory.js',
 ]
 
 LIBRARY_NAME = 'satchel'
 
 EXTRA_JS_MODULES += [
     'nsFormAutoCompleteResult.jsm',
 ]
+
+EXTRA_PP_JS_MODULES += [
+    'FormHistory.jsm',
+]
+
--- a/toolkit/modules/Makefile.in
+++ b/toolkit/modules/Makefile.in
@@ -13,22 +13,9 @@ ifdef MOZ_TOOLKIT_SEARCH
 DEFINES += -DMOZ_TOOLKIT_SEARCH
 endif
 
 DEFINES += \
   -DMOZ_APP_NAME=$(MOZ_APP_NAME) \
   -DMOZ_BUILD_APP=$(MOZ_BUILD_APP) \
   $(NULL)
 
-EXTRA_PP_JS_MODULES = \
-  CertUtils.jsm \
-  ResetProfile.jsm \
-  Services.jsm \
-  Troubleshoot.jsm \
-  UpdateChannel.jsm \
-  WindowDraggingUtils.jsm \
-  $(NULL)
-
-ifneq (Android,$(OS_TARGET))
-EXTRA_PP_JS_MODULES += LightweightThemeConsumer.jsm
-endif
-
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/modules/moz.build
+++ b/toolkit/modules/moz.build
@@ -25,8 +25,22 @@ EXTRA_JS_MODULES += [
     'RemoteWebProgress.jsm',
     'Sqlite.jsm',
     'Task.jsm',
     'TelemetryTimestamps.jsm',
     'Timer.jsm',
     'debug.js',
 ]
 
+EXTRA_PP_JS_MODULES += [
+    'CertUtils.jsm',
+    'ResetProfile.jsm',
+    'Services.jsm',
+    'Troubleshoot.jsm',
+    'UpdateChannel.jsm',
+    'WindowDraggingUtils.jsm',
+]
+
+if 'Android' != CONFIG['OS_TARGET']:
+    EXTRA_PP_JS_MODULES += [
+        'LightweightThemeConsumer.jsm',
+    ]
+
deleted file mode 100644
--- a/toolkit/mozapps/downloads/Makefile.in
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# 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/.
-
-DEPTH     = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-VPATH     = @srcdir@
-
-include $(topsrcdir)/config/config.mk
-
-
-EXTRA_PP_JS_MODULES = DownloadTaskbarProgress.jsm
-
-include $(topsrcdir)/config/rules.mk
--- a/toolkit/mozapps/downloads/moz.build
+++ b/toolkit/mozapps/downloads/moz.build
@@ -17,8 +17,12 @@ EXTRA_PP_COMPONENTS += [
 ]
 
 EXTRA_JS_MODULES += [
     'DownloadLastDir.jsm',
     'DownloadPaths.jsm',
     'DownloadUtils.jsm',
 ]
 
+EXTRA_PP_JS_MODULES += [
+    'DownloadTaskbarProgress.jsm',
+]
+
--- a/toolkit/mozapps/extensions/Makefile.in
+++ b/toolkit/mozapps/extensions/Makefile.in
@@ -21,21 +21,15 @@ DEFINES += -DMOZ_EXTENSIONS_DB_SCHEMA=14
 # MOZ_EM_DEBUG environment variable when building.
 ifneq (,$(MOZ_EM_DEBUG))
 DEFINES += -DMOZ_EM_DEBUG=1
 else ifdef MOZ_DEBUG
 DEFINES += -DMOZ_EM_DEBUG=1
 endif
 
 
-EXTRA_PP_JS_MODULES = \
-  AddonManager.jsm \
-  XPIProvider.jsm \
-  XPIProviderUtils.js \
-  $(NULL)
-
 EXTRA_DSO_LDOPTS = \
   $(MOZ_JS_LIBS) \
   $(MOZ_UNICHARUTIL_LIBS) \
   $(MOZ_COMPONENT_LIBS) \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/mozapps/extensions/moz.build
+++ b/toolkit/mozapps/extensions/moz.build
@@ -34,8 +34,14 @@ EXTRA_JS_MODULES += [
     'ChromeManifestParser.jsm',
     'DeferredSave.jsm',
     'LightweightThemeImageOptimizer.jsm',
     'LightweightThemeManager.jsm',
     'PluginProvider.jsm',
     'SpellCheckDictionaryBootstrap.js',
 ]
 
+EXTRA_PP_JS_MODULES += [
+    'AddonManager.jsm',
+    'XPIProvider.jsm',
+    'XPIProviderUtils.js',
+]
+
deleted file mode 100644
--- a/toolkit/webapps/Makefile.in
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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/.
-
-DEPTH     = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-VPATH     = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-include $(topsrcdir)/config/config.mk
-
-EXTRA_PP_JS_MODULES = \
-	WebappOSUtils.jsm \
-	WebappsInstaller.jsm \
-	$(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/toolkit/webapps/moz.build
+++ b/toolkit/webapps/moz.build
@@ -1,6 +1,11 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
+EXTRA_PP_JS_MODULES += [
+    'WebappOSUtils.jsm',
+    'WebappsInstaller.jsm',
+]
+