Bug 870370 - Move EXTRA_COMPONENTS to mozbuild (file batch #3); r=mshal
authorJoey Armstrong <joey@mozilla.com>
Tue, 11 Jun 2013 16:38:22 -0400
changeset 141054 f2528126addb5804de1b3ebfce42f164fb1c7a62
parent 141053 811f66038c9364680f2d3c301ba408898c2b0fcc
child 141055 225a4dbdeb1fb12a93e79b13009d558aba9bad8d
push id31979
push userMs2ger@gmail.com
push dateFri, 02 Aug 2013 09:08:26 +0000
treeherdermozilla-inbound@ee108221c037 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs870370
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 870370 - Move EXTRA_COMPONENTS to mozbuild (file batch #3); r=mshal
content/base/src/Makefile.in
content/base/src/moz.build
content/xslt/src/xslt/Makefile.in
content/xslt/src/xslt/moz.build
dom/mobilemessage/src/Makefile.in
dom/mobilemessage/src/moz.build
dom/system/Makefile.in
dom/system/gonk/Makefile.in
dom/system/gonk/moz.build
dom/system/moz.build
dom/wappush/src/Makefile.in
dom/wappush/src/moz.build
dom/wifi/Makefile.in
dom/wifi/moz.build
dom/workers/test/extensions/traditional/Makefile.in
dom/workers/test/extensions/traditional/moz.build
extensions/widgetutils/src/Makefile.in
image/decoders/icon/qt/Makefile.in
image/decoders/icon/qt/moz.build
layout/tools/recording/Makefile.in
layout/tools/recording/moz.build
layout/tools/reftest/Makefile.in
layout/tools/reftest/moz.build
netwerk/protocol/app/Makefile.in
netwerk/protocol/app/moz.build
netwerk/test/httpserver/Makefile.in
netwerk/test/httpserver/moz.build
services/common/Makefile.in
services/common/moz.build
services/crypto/Makefile.in
services/crypto/moz.build
services/datareporting/Makefile.in
services/datareporting/moz.build
services/healthreport/Makefile.in
services/healthreport/moz.build
services/sync/Makefile.in
services/sync/moz.build
testing/specialpowers/Makefile.in
testing/specialpowers/moz.build
toolkit/mozapps/plugins/Makefile.in
toolkit/mozapps/plugins/moz.build
uriloader/exthandler/Makefile.in
uriloader/exthandler/moz.build
webapprt/Makefile.in
webapprt/moz.build
xpcom/ds/Makefile.in
xpcom/ds/moz.build
xpcom/sample/Makefile.in
xpcom/sample/moz.build
--- a/content/base/src/Makefile.in
+++ b/content/base/src/Makefile.in
@@ -17,24 +17,16 @@ LIBXUL_LIBRARY	= 1
 ifdef MOZ_WEBRTC
 LOCAL_INCLUDES += \
 		-I$(topsrcdir)/netwerk/sctp/datachannel \
 		$(NULL)
 endif
 
 GQI_SRCS = contentbase.gqi
 
-EXTRA_COMPONENTS = \
-		contentSecurityPolicy.manifest \
-		contentAreaDropListener.js \
-		contentAreaDropListener.manifest \
-		messageWakeupService.js \
-		messageWakeupService.manifest \
-		$(NULL)
-
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 
 LOCAL_INCLUDES += \
   -I$(topsrcdir)/caps/include \
   -I$(topsrcdir)/content/events/src \
   -I$(topsrcdir)/content/html/content/src \
--- a/content/base/src/moz.build
+++ b/content/base/src/moz.build
@@ -149,15 +149,23 @@ CPP_SOURCES += [
     'nsTreeSanitizer.cpp',
     'nsViewportInfo.cpp',
     'nsXHTMLContentSerializer.cpp',
     'nsXMLContentSerializer.cpp',
     'nsXMLHttpRequest.cpp',
     'nsXMLNameSpaceMap.cpp',
 ]
 
+EXTRA_COMPONENTS += [
+    'contentAreaDropListener.js',
+    'contentAreaDropListener.manifest',
+    'contentSecurityPolicy.manifest',
+    'messageWakeupService.js',
+    'messageWakeupService.manifest',
+]
+
 EXTRA_PP_COMPONENTS += [
     'contentSecurityPolicy.js',
 ]
 
 EXTRA_JS_MODULES += [
     'CSPUtils.jsm',
 ]
--- a/content/xslt/src/xslt/Makefile.in
+++ b/content/xslt/src/xslt/Makefile.in
@@ -12,21 +12,16 @@ include $(DEPTH)/config/autoconf.mk
 LIBXUL_LIBRARY = 1
 FAIL_ON_WARNINGS = 1
 
 # For nsDependentJSString
 LOCAL_INCLUDES += \
   -I$(topsrcdir)/dom/base \
   $(NULL)
 
-EXTRA_COMPONENTS = \
-  txEXSLTRegExFunctions.js \
-  txEXSLTRegExFunctions.manifest \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 INCLUDES += \
 	-I$(srcdir) \
 	-I$(srcdir)/../base \
 	-I$(srcdir)/../xml \
 	-I$(srcdir)/../xpath \
 	-I$(srcdir)/../../../base/src \
--- a/content/xslt/src/xslt/moz.build
+++ b/content/xslt/src/xslt/moz.build
@@ -34,10 +34,15 @@ CPP_SOURCES += [
     'txXPathResultComparator.cpp',
     'txXSLTEnvironmentFunctionCall.cpp',
     'txXSLTNumber.cpp',
     'txXSLTNumberCounters.cpp',
     'txXSLTPatterns.cpp',
     'txXSLTProcessor.cpp',
 ]
 
+EXTRA_COMPONENTS += [
+    'txEXSLTRegExFunctions.js',
+    'txEXSLTRegExFunctions.manifest',
+]
+
 LIBRARY_NAME = 'txxslt_s'
 
--- a/dom/mobilemessage/src/Makefile.in
+++ b/dom/mobilemessage/src/Makefile.in
@@ -36,20 +36,13 @@ LOCAL_INCLUDES = \
 # subdirectory (and the ipc one).
 LOCAL_INCLUDES += $(VPATH:%=-I%)
 
 ifdef MOZ_B2G_RIL
 LOCAL_INCLUDES += \
   -I$(topsrcdir)/dom/telephony \
   -I$(topsrcdir)/dom/system/gonk \
   $(NULL)
-
-EXTRA_COMPONENTS = \
-  gonk/MmsService.js \
-  gonk/MmsService.manifest \
-  gonk/MobileMessageDatabaseService.js \
-  gonk/MobileMessageDatabaseService.manifest \
-  $(NULL)
 endif
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
--- a/dom/mobilemessage/src/moz.build
+++ b/dom/mobilemessage/src/moz.build
@@ -59,14 +59,22 @@ CPP_SOURCES += [
     'SmsIPCService.cpp',
     'SmsMessage.cpp',
     'SmsParent.cpp',
     'SmsSegmentInfo.cpp',
     'SmsService.cpp',
     'SmsServicesFactory.cpp',
 ]
 
+if CONFIG['MOZ_B2G_RIL']:
+    EXTRA_COMPONENTS += [
+        'gonk/MmsService.js',
+        'gonk/MmsService.manifest',
+        'gonk/MobileMessageDatabaseService.js',
+        'gonk/MobileMessageDatabaseService.manifest',
+    ]
+
 IPDL_SOURCES += [
     'ipc/PMobileMessageCursor.ipdl',
     'ipc/PSms.ipdl',
     'ipc/PSmsRequest.ipdl',
     'ipc/SmsTypes.ipdlh',
 ]
--- a/dom/system/Makefile.in
+++ b/dom/system/Makefile.in
@@ -15,36 +15,16 @@ FAIL_ON_WARNINGS := 1
 
 DEFINES += -DDLL_PREFIX=\"$(DLL_PREFIX)\" -DDLL_SUFFIX=\"$(DLL_SUFFIX)\"
 
 # We fire the nsDOMDeviceAcceleration
 LOCAL_INCLUDES += \
   -I$(topsrcdir)/content/events/src \
   -I$(topsrcdir)/dom/base \
   -I$(topsrcdir)/dom/bindings \
-  $(NULL)
-
-# On Systems that have build in geolocation providers,
-# we really do not need these.
-ifneq (Android,$(OS_TARGET))
-EXTRA_COMPONENTS = \
-  NetworkGeolocationProvider.js \
-  NetworkGeolocationProvider.manifest \
-  $(NULL)
-endif
-
-ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
-EXTRA_COMPONENTS = \
-  NetworkGeolocationProvider.js \
-  NetworkGeolocationProvider.manifest \
-  $(NULL)
-endif
-
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/content/events/src \
   -I$(topsrcdir)/js/xpconnect/loader \
   $(NULL)
 
 include $(topsrcdir)/config/config.mk
 
 EXPORT_LIBRARY = 1
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
--- a/dom/system/gonk/Makefile.in
+++ b/dom/system/gonk/Makefile.in
@@ -31,21 +31,11 @@ LOCAL_INCLUDES = \
   -I$(topsrcdir)/dom/base \
   -I$(topsrcdir)/dom/src/geolocation \
   -I$(topsrcdir)/dom/telephony \
   -I$(topsrcdir)/dom/wifi \
   -I$(topsrcdir)/dom/bluetooth \
   -I$(topsrcdir)/content/events/src \
   $(NULL)
 
-EXTRA_COMPONENTS = \
-  NetworkManager.manifest \
-  NetworkManager.js \
-  RadioInterfaceLayer.manifest \
-  RadioInterfaceLayer.js \
-  RILContentHelper.js \
-  NetworkInterfaceListService.manifest \
-  NetworkInterfaceListService.js \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 
--- a/dom/system/gonk/moz.build
+++ b/dom/system/gonk/moz.build
@@ -62,15 +62,25 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk
 
 if CONFIG['ENABLE_TESTS']:
     XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']
 
 CPP_SOURCES += [
     'SystemWorkerManager.cpp',
 ]
 
+EXTRA_COMPONENTS += [
+    'NetworkInterfaceListService.js',
+    'NetworkInterfaceListService.manifest',
+    'NetworkManager.js',
+    'NetworkManager.manifest',
+    'RILContentHelper.js',
+    'RadioInterfaceLayer.js',
+    'RadioInterfaceLayer.manifest',
+]
+
 EXTRA_JS_MODULES += [
     'net_worker.js',
     'ril_consts.js',
     'ril_worker.js',
     'systemlibs.js',
 ]
 
--- a/dom/system/moz.build
+++ b/dom/system/moz.build
@@ -36,8 +36,16 @@ EXPORTS.mozilla += [
     'OSFileConstants.h',
 ]
 
 CPP_SOURCES += [
     'OSFileConstants.cpp',
     'nsDeviceSensors.cpp',
 ]
 
+# On Systems that have build in geolocation providers,
+# we really do not need these.
+if CONFIG['OS_TARGET'] != 'Android' or CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+    EXTRA_COMPONENTS += [
+        'NetworkGeolocationProvider.js',
+        'NetworkGeolocationProvider.manifest',
+    ]
+
deleted file mode 100644
--- a/dom/wappush/src/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) \
-  $(NULL)
-
-include $(DEPTH)/config/autoconf.mk
-
-ifdef MOZ_B2G_RIL
-EXTRA_COMPONENTS = \
-  $(NULL)
-endif
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/wappush/src/moz.build
+++ b/dom/wappush/src/moz.build
@@ -1,8 +1,9 @@
+# -*- 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/.
 
 if CONFIG['MOZ_B2G_RIL']:
     EXTRA_JS_MODULES = [
         'gonk/CpPduHelper.jsm',
--- a/dom/wifi/Makefile.in
+++ b/dom/wifi/Makefile.in
@@ -9,18 +9,11 @@ VPATH            = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME     = domwifi_s
 LIBXUL_LIBRARY   = 1
 
 include $(topsrcdir)/dom/dom-config.mk
 
-EXTRA_COMPONENTS = \
-  WifiWorker.js \
-  WifiWorker.manifest \
-  DOMWifiManager.js \
-  DOMWifiManager.manifest \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 
--- a/dom/wifi/moz.build
+++ b/dom/wifi/moz.build
@@ -16,13 +16,20 @@ XPIDL_FLAGS += [
     '-I$(topsrcdir)/dom/base',
     '-I$(topsrcdir)/dom/interfaces/base',
     '-I$(topsrcdir)/dom/interfaces/events',
     '-I$(topsrcdir)/dom/system/gonk',
 ]
 
 MODULE = 'dom'
 
+EXTRA_COMPONENTS += [
+    'DOMWifiManager.js',
+    'DOMWifiManager.manifest',
+    'WifiWorker.js',
+    'WifiWorker.manifest',
+]
+
 EXTRA_JS_MODULES += [
     'libhardware_legacy.js',
     'wifi_worker.js',
 ]
 
--- a/dom/workers/test/extensions/traditional/Makefile.in
+++ b/dom/workers/test/extensions/traditional/Makefile.in
@@ -5,21 +5,16 @@
 DEPTH            = @DEPTH@
 topsrcdir        = @top_srcdir@
 srcdir           = @srcdir@
 VPATH            = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 XPI_NAME = worker
-EXTRA_COMPONENTS = \
-  WorkerTest.js \
-  WorkerTest.manifest \
-  $(NULL)
-
 DIST_FILES = \
   install.rdf \
   worker.js \
   $(NULL)
 
 TEST_EXTENSIONS_DIR = $(DEPTH)/_tests/testing/mochitest/extensions
 
 GENERATED_DIRS = $(TEST_EXTENSIONS_DIR)
--- a/dom/workers/test/extensions/traditional/moz.build
+++ b/dom/workers/test/extensions/traditional/moz.build
@@ -5,8 +5,12 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 XPIDL_SOURCES += [
     'nsIWorkerTest.idl',
 ]
 
 XPIDL_MODULE = 'WorkerTest'
 
+EXTRA_COMPONENTS += [
+    'WorkerTest.js',
+    'WorkerTest.manifest',
+]
--- a/extensions/widgetutils/src/Makefile.in
+++ b/extensions/widgetutils/src/Makefile.in
@@ -11,24 +11,18 @@ VPATH		= @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 XPI_NAME	= widgetutils
 SHORT_LIBNAME = widgetutils
 FORCE_SHARED_LIB = 1
 IS_COMPONENT = 1
 
 EXTRA_DSO_LDOPTS = \
-	$(XPCOM_GLUE_LDOPTS) \
-	$(NSPR_LIBS) \
-	$(NULL)
-
-EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
-
-EXPORT_RESOURCE = \
-	$(NULL)
+  $(XPCOM_GLUE_LDOPTS) \
+  $(NSPR_LIBS) \
+  $(MOZ_COMPONENT_LIBS) \
+  $(NULL)
 
 ifdef TARGET_XPCOM_ABI
 FINAL_TARGET=$(DIST)/xpi-stage/$(XPI_NAME)/platform/$(OS_TARGET)_$(TARGET_XPCOM_ABI)
 endif
 
-#EXTRA_COMPONENTS = $(srcdir)/SimpleTest.js
-
 include $(topsrcdir)/config/rules.mk
--- a/image/decoders/icon/qt/Makefile.in
+++ b/image/decoders/icon/qt/Makefile.in
@@ -9,12 +9,10 @@ VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBXUL_LIBRARY	= 1
 
 
 LOCAL_INCLUDES += $(MOZ_QT_CFLAGS)
 
-EXTRA_COMPONENTS = gtkqticonsconverter.manifest
-
 include $(topsrcdir)/config/rules.mk
 
--- a/image/decoders/icon/qt/moz.build
+++ b/image/decoders/icon/qt/moz.build
@@ -7,14 +7,18 @@
 DIRS += ['public']
 
 MODULE = 'imgicon'
 
 CPP_SOURCES += [
     'nsIconChannel.cpp',
 ]
 
+EXTRA_COMPONENTS += [
+    'gtkqticonsconverter.manifest',
+]
+
 EXTRA_PP_COMPONENTS += [
     'gtkqticonsconverter.js',
 ]
 
 LIBRARY_NAME = 'imgiconqt_s'
 
deleted file mode 100644
--- a/layout/tools/recording/Makefile.in
+++ /dev/null
@@ -1,19 +0,0 @@
-# vim: set shiftwidth=8 tabstop=8 autoindent noexpandtab copyindent:
-# 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_COMPONENTS = \
-		recording-cmdline.js \
-		$(NULL)
-
-EXTRA_COMPONENTS += recording-cmdline.manifest
-
-include $(topsrcdir)/config/rules.mk
--- a/layout/tools/recording/moz.build
+++ b/layout/tools/recording/moz.build
@@ -1,7 +1,12 @@
 # -*- 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/.
 
 MODULE = 'recording'
+
+EXTRA_COMPONENTS += [
+    'recording-cmdline.js',
+    'recording-cmdline.manifest',
+]
--- a/layout/tools/reftest/Makefile.in
+++ b/layout/tools/reftest/Makefile.in
@@ -5,20 +5,16 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-EXTRA_COMPONENTS= \
-		reftest-cmdline.js \
-		$(NULL)
-
 ifdef XPI_NAME
 NO_JS_MANIFEST = 1
 DIST_FILES = install.rdf
 
 ifeq ($(MOZ_BUILD_APP),mobile/android)
 DEFINES += -DBOOTSTRAP
 DIST_FILES += bootstrap.js
 endif
--- a/layout/tools/reftest/moz.build
+++ b/layout/tools/reftest/moz.build
@@ -1,8 +1,12 @@
 # -*- 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/.
 
 MODULE = 'reftest'
 
+EXTRA_COMPONENTS += [
+    'reftest-cmdline.js',
+]
+
deleted file mode 100644
--- a/netwerk/protocol/app/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_COMPONENTS = \
-  AppProtocolHandler.js \
-  AppProtocolHandler.manifest \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/netwerk/protocol/app/moz.build
+++ b/netwerk/protocol/app/moz.build
@@ -1,6 +1,10 @@
 # -*- 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_COMPONENTS += [
+    'AppProtocolHandler.js',
+    'AppProtocolHandler.manifest',
+]
--- a/netwerk/test/httpserver/Makefile.in
+++ b/netwerk/test/httpserver/Makefile.in
@@ -9,20 +9,16 @@ topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 NO_INTERFACES_MANIFEST = 1
 
-EXTRA_COMPONENTS = \
-                   httpd.js \
-                   $(NULL)
-
 ifdef XPI_NAME
 NO_JS_MANIFEST = 1
 USE_EXTENSION_MANIFEST = 1
 else
 EXTRA_COMPONENTS += \
                    httpd.manifest \
                    $(NULL)
 endif
--- a/netwerk/test/httpserver/moz.build
+++ b/netwerk/test/httpserver/moz.build
@@ -6,8 +6,13 @@
 
 XPIDL_SOURCES += [
     'nsIHttpServer.idl',
 ]
 
 MODULE = 'test_necko'
 
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
+
+EXTRA_COMPONENTS += [
+    'httpd.js',
+]
+
--- a/services/common/Makefile.in
+++ b/services/common/Makefile.in
@@ -26,20 +26,16 @@ pp_modules := \
 
 testing_modules := \
   bagheeraserver.js \
   logging.js \
   storageserver.js \
   utils.js \
   $(NULL)
 
-EXTRA_COMPONENTS := \
-  servicesComponents.manifest \
-  $(NULL)
-
 PREF_JS_EXPORTS = $(srcdir)/services-common.js
 
 MODULES_FILES := $(modules)
 MODULES_DEST = $(FINAL_TARGET)/modules/services-common
 INSTALL_TARGETS += MODULES
 
 TESTING_JS_MODULES := $(addprefix modules-testing/,$(testing_modules))
 TESTING_JS_MODULE_DIR := services-common
--- a/services/common/moz.build
+++ b/services/common/moz.build
@@ -1,7 +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/.
 
 TEST_DIRS += ['tests']
+
+EXTRA_COMPONENTS += [
+    'servicesComponents.manifest',
+]
--- a/services/crypto/Makefile.in
+++ b/services/crypto/Makefile.in
@@ -9,17 +9,13 @@ VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 modules := \
   utils.js \
   WeaveCrypto.js \
   $(NULL)
 
-EXTRA_COMPONENTS := \
-  cryptoComponents.manifest \
-  $(NULL)
-
 CRYPTO_MODULE_FILES := $(addprefix modules/,$(modules))
 CRYPTO_MODULE_DEST = $(FINAL_TARGET)/modules/services-crypto
 INSTALL_TARGETS += CRYPTO_MODULE
 
 include $(topsrcdir)/config/rules.mk
--- a/services/crypto/moz.build
+++ b/services/crypto/moz.build
@@ -4,8 +4,11 @@
 # 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/.
 
 DIRS += ['component']
 TEST_DIRS += ['tests']
 
 MODULE = 'services-crypto'
 
+EXTRA_COMPONENTS += [
+    'cryptoComponents.manifest',
+]
--- a/services/datareporting/Makefile.in
+++ b/services/datareporting/Makefile.in
@@ -11,15 +11,11 @@ include $(DEPTH)/config/autoconf.mk
 
 MODULES := policy.jsm sessions.jsm
 MODULES_PATH = $(FINAL_TARGET)/modules/services/datareporting
 PP_TARGETS += MODULES
 
 TESTING_JS_MODULES := $(addprefix modules-testing/,mocks.jsm)
 TESTING_JS_MODULE_DIR := services/datareporting
 
-EXTRA_COMPONENTS := \
-  DataReporting.manifest \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 $(FINAL_TARGET)/components/DataReportingService.js: policy.jsm sessions.jsm ../common/observers.js
--- a/services/datareporting/moz.build
+++ b/services/datareporting/moz.build
@@ -1,11 +1,15 @@
 # -*- 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_COMPONENTS += [
+    'DataReporting.manifest',
+]
+
 EXTRA_PP_COMPONENTS += [
     'DataReportingService.js',
 ]
--- a/services/healthreport/Makefile.in
+++ b/services/healthreport/Makefile.in
@@ -41,17 +41,13 @@ PP_TARGETS += MAIN_JS_MODULE
 MODULES := $(modules)
 MODULES_PATH = $(FINAL_TARGET)/modules/services/healthreport
 MODULES_FLAGS := $(extra_pp_flags)
 PP_TARGETS += MODULES
 
 TESTING_JS_MODULES := $(addprefix modules-testing/,$(testing_modules))
 TESTING_JS_MODULE_DIR := services/healthreport
 
-EXTRA_COMPONENTS := \
-  HealthReportComponents.manifest \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 # Add extra prerequisites until bug 837792 is addressed.
 $(FINAL_TARGET)/modules/HealthReport.jsm: $(healthreport_depends)
 
--- a/services/healthreport/moz.build
+++ b/services/healthreport/moz.build
@@ -1,7 +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/.
 
 TEST_DIRS += ['tests']
+
+EXTRA_COMPONENTS += [
+    'HealthReportComponents.manifest',
+]
--- a/services/sync/Makefile.in
+++ b/services/sync/Makefile.in
@@ -61,21 +61,16 @@ sync_stage_modules := \
   $(NULL)
 
 sync_testing_modules := \
   fakeservices.js \
   rotaryengine.js \
   utils.js \
   $(NULL)
 
-EXTRA_COMPONENTS := \
-  SyncComponents.manifest \
-  Weave.js \
-  $(NULL)
-
 PREF_JS_EXPORTS := $(srcdir)/services-sync.js
 
 # Install JS module files.
 SYNC_MAIN_FILES := $(addprefix modules/,$(sync_modules))
 SYNC_MAIN_DEST = $(FINAL_TARGET)/modules/services-sync
 INSTALL_TARGETS += SYNC_MAIN
 
 SYNC_ENGINES_FILES := $(addprefix modules/engines/,$(sync_engine_modules))
--- a/services/sync/moz.build
+++ b/services/sync/moz.build
@@ -1,8 +1,13 @@
 # -*- 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/.
 
 DIRS += ['locales']
 TEST_DIRS += ['tests']
+
+EXTRA_COMPONENTS += [
+    'SyncComponents.manifest',
+    'Weave.js',
+]
--- a/testing/specialpowers/Makefile.in
+++ b/testing/specialpowers/Makefile.in
@@ -13,18 +13,16 @@ include $(DEPTH)/config/autoconf.mk
 
 NO_JS_MANIFEST = 1
 MOZ_CHROME_FILE_FORMAT = flat
 DIST_FILES = \
   install.rdf \
   chrome.manifest \
   $(NULL)
 
-EXTRA_COMPONENTS = components/SpecialPowersObserver.js
-
 XPI_NAME=specialpowers
 
 # Used in install.rdf
 USE_EXTENSION_MANIFEST=1
 
 TEST_EXTENSIONS_DIR = $(DEPTH)/testing/specialpowers
 
 include $(topsrcdir)/config/rules.mk
--- a/testing/specialpowers/moz.build
+++ b/testing/specialpowers/moz.build
@@ -1,6 +1,9 @@
 # -*- 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_COMPONENTS += [
+    'components/SpecialPowersObserver.js',
+]
deleted file mode 100644
--- a/toolkit/mozapps/plugins/Makefile.in
+++ /dev/null
@@ -1,15 +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_COMPONENTS = pluginGlue.manifest
-
-include $(topsrcdir)/config/rules.mk
--- a/toolkit/mozapps/plugins/moz.build
+++ b/toolkit/mozapps/plugins/moz.build
@@ -1,7 +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/.
 
 TEST_DIRS += ['tests']
+
+EXTRA_COMPONENTS += [
+    'pluginGlue.manifest',
+]
--- a/uriloader/exthandler/Makefile.in
+++ b/uriloader/exthandler/Makefile.in
@@ -71,22 +71,15 @@ ifeq ($(MOZ_PLATFORM_MAEMO),5)
 ifdef MOZ_ENABLE_GNOMEVFS
 LOCAL_INCLUDES   += $(MOZ_GNOMEVFS_CFLAGS)
 endif
 ifdef MOZ_ENABLE_GIO
 LOCAL_INCLUDES   += $(MOZ_GIO_CFLAGS)
 endif
 endif
 
-EXTRA_COMPONENTS = \
-  nsHandlerService.js \
-  nsHandlerService.manifest \
-  nsWebHandlerApp.js \
-  nsWebHandlerApp.manifest \
-  $(NULL)
-
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 
 ifneq (,$(filter qt gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT)))
 CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
 endif
--- a/uriloader/exthandler/moz.build
+++ b/uriloader/exthandler/moz.build
@@ -107,11 +107,18 @@ if CONFIG['MOZ_ENABLE_MEEGOTOUCHSHARE']:
         'nsMeegoExternalSharingAppService.cpp',
     ]
 
 if CONFIG['MOZ_ENABLE_CONTENTACTION']:
     CPP_SOURCES += [
         'nsContentHandlerApp.cpp',
     ]
 
+EXTRA_COMPONENTS += [
+    'nsHandlerService.js',
+    'nsHandlerService.manifest',
+    'nsWebHandlerApp.js',
+    'nsWebHandlerApp.manifest',
+]
+
 IPDL_SOURCES += [
     'PExternalHelperApp.ipdl',
 ]
--- a/webapprt/Makefile.in
+++ b/webapprt/Makefile.in
@@ -10,24 +10,16 @@ VPATH     = @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 # Include config.mk explicitly so we can override FINAL_TARGET.
 include $(topsrcdir)/config/config.mk
 
 # Place webapprt resources in a separate app dir
 DIST_SUBDIR = webapprt
 
-EXTRA_COMPONENTS := \
-  components.manifest \
-  CommandLineHandler.js \
-  ContentPermission.js \
-  ContentPolicy.js \
-  DirectoryProvider.js \
-  $(NULL)
-
 PREF_JS_EXPORTS = $(srcdir)/prefs.js \
                   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef MOZ_DEBUG
 DEFINES += -DMOZ_DEBUG=1
 endif
--- a/webapprt/moz.build
+++ b/webapprt/moz.build
@@ -9,13 +9,21 @@ if CONFIG['OS_ARCH'] == 'WINNT':
 elif CONFIG['OS_ARCH'] == 'Darwin':
     DIRS += ['mac']
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2':
     DIRS += ['gtk2']
 
 DIRS += ['locales']
 TEST_DIRS += ['test']
 
+EXTRA_COMPONENTS += [
+    'CommandLineHandler.js',
+    'ContentPermission.js',
+    'ContentPolicy.js',
+    'DirectoryProvider.js',
+    'components.manifest',
+]
+
 EXTRA_JS_MODULES += [
     'Startup.jsm',
     'WebappRT.jsm',
     'WebappsHandler.jsm',
 ]
--- a/xpcom/ds/Makefile.in
+++ b/xpcom/ds/Makefile.in
@@ -9,18 +9,12 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MSVC_ENABLE_PGO := 1
 LIBXUL_LIBRARY	= 1
 MOZILLA_INTERNAL_API = 1
 
-EXTRA_COMPONENTS = \
-  nsINIProcessor.js \
-  nsINIProcessor.manifest \
-  $(NULL)
-
-
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES += -I$(srcdir)/../io
 
--- a/xpcom/ds/moz.build
+++ b/xpcom/ds/moz.build
@@ -108,10 +108,15 @@ elif CONFIG['HAVE_CLOCK_MONOTONIC']:
     ]
 elif CONFIG['OS_ARCH'] == 'Darwin':
     CPP_SOURCES += [
         'TimeStamp_darwin.cpp',
     ]
 else:
     error('No TimeStamp implementation on this platform.  Build will not succeed')
 
+EXTRA_COMPONENTS += [
+    'nsINIProcessor.js',
+    'nsINIProcessor.manifest',
+]
+
 LIBRARY_NAME = 'xpcomds_s'
 
--- a/xpcom/sample/Makefile.in
+++ b/xpcom/sample/Makefile.in
@@ -20,23 +20,18 @@ SHORT_LIBNAME	= xpcomsmp
 
 # IS_COMPONENT indicates that this makefile builds a component shared library.
 IS_COMPONENT	= 1
 
 # If this is Makefile builds a component, MODULE_NAME must match the module
 # name specified in NS_IMPL_NSGETMODULE
 MODULE_NAME	= nsSampleModule
 
-# CPPSRCS specifies C++ files to be built into a library.
 include $(topsrcdir)/config/config.mk
 
-# EXTRA_COMPONENTS installs components written JavaScript to
-# dist/bin/components
-EXTRA_COMPONENTS = nsSample.js nsSample.manifest
-
 # EXTRA_DSO_LDOPTS specifies linker flags when building a shared library
 # from this Makefile. We link against the "dependent glue" and against the
 # frozen XPCOM shared library.
 EXTRA_DSO_LDOPTS = \
 		$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
 		$(XPCOM_FROZEN_LDOPTS) \
 		$(NSPR_LIBS) \
 		$(NULL)
--- a/xpcom/sample/moz.build
+++ b/xpcom/sample/moz.build
@@ -5,15 +5,24 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['program']
 
 # XPIDL_SOURCES specifies IDL files. The build system runs the xpidl tool
 # on these files to generate C++ headers and .xpt typelib files.
 XPIDL_SOURCES += ['nsISample.idl']
 
+# MODULE specifies where header files from this Makefile are installed,
+# i.e. dist/include/xpcomsample
 MODULE = 'xpcomsample'
 
+# CPP_SOURCES specifies C++ files to be built into a library.
 CPP_SOURCES += [
     'nsSample.cpp',
     'nsSampleModule.cpp',
 ]
 
+# EXTRA_COMPONENTS installs components written JavaScript to
+# dist/bin/components
+EXTRA_COMPONENTS += [
+    'nsSample.js',
+    'nsSample.manifest',
+]