Bug 818246 - Part 5: Move XPIDLSRCS into moz.build (manual); r=glandium
authorGregory Szorc <gps@mozilla.com>
Tue, 12 Mar 2013 10:20:41 -0700
changeset 125023 b5dc4f0d5a32f120dc402b31ccda80af5501a69b
parent 125022 d54481a205e308b645e33d977e40fe753c9e5682
child 125024 b8f89bbfb7f1d0508107b63b7d1b17458b05bc9d
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersglandium
bugs818246
milestone22.0a1
Bug 818246 - Part 5: Move XPIDLSRCS into moz.build (manual); r=glandium
browser/components/shell/public/Makefile.in
browser/components/shell/public/moz.build
content/xul/content/public/Makefile.in
content/xul/content/public/moz.build
content/xul/document/public/Makefile.in
content/xul/document/public/moz.build
dom/bluetooth/Makefile.in
dom/bluetooth/moz.build
dom/interfaces/base/Makefile.in
dom/interfaces/base/moz.build
dom/mobilemessage/interfaces/Makefile.in
dom/mobilemessage/interfaces/moz.build
dom/network/interfaces/Makefile.in
dom/network/interfaces/moz.build
embedding/browser/webBrowser/Makefile.in
embedding/browser/webBrowser/moz.build
extensions/pref/autoconfig/public/Makefile.in
extensions/pref/autoconfig/public/moz.build
layout/base/Makefile.in
layout/base/moz.build
netwerk/base/public/Makefile.in
netwerk/base/public/moz.build
netwerk/streamconv/public/Makefile.in
netwerk/streamconv/public/moz.build
security/manager/ssl/public/Makefile.in
security/manager/ssl/public/moz.build
toolkit/components/alerts/Makefile.in
toolkit/components/alerts/moz.build
toolkit/components/filepicker/Makefile.in
toolkit/components/filepicker/moz.build
toolkit/components/places/Makefile.in
toolkit/components/places/moz.build
toolkit/mozapps/update/Makefile.in
toolkit/mozapps/update/moz.build
toolkit/xre/Makefile.in
toolkit/xre/moz.build
tools/profiler/Makefile.in
tools/profiler/moz.build
widget/Makefile.in
widget/moz.build
xpcom/base/Makefile.in
xpcom/base/moz.build
xpcom/ds/Makefile.in
xpcom/ds/moz.build
xpcom/io/Makefile.in
xpcom/io/moz.build
xpcom/sample/Makefile.in
xpcom/sample/moz.build
xpcom/system/Makefile.in
xpcom/system/moz.build
--- a/browser/components/shell/public/Makefile.in
+++ b/browser/components/shell/public/Makefile.in
@@ -7,17 +7,9 @@ DEPTH   = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH   = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = shellservice
 
-ifeq ($(OS_ARCH),WINNT)
-XPIDLSRCS += nsIWindowsShellService.idl
-endif
-
-ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-XPIDLSRCS += nsIMacShellService.idl
-endif
-
 include $(topsrcdir)/config/rules.mk
--- a/browser/components/shell/public/moz.build
+++ b/browser/components/shell/public/moz.build
@@ -2,8 +2,17 @@
 # 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/.
 
 XPIDL_SOURCES += [
     'nsIShellService.idl',
 ]
 
+if CONFIG['OS_ARCH'] == 'WINNT':
+    XPIDL_SOURCES += [
+        'nsIWindowsShellService.idl',
+    ]
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+    XPIDL_SOURCES += [
+        'nsIMacShellService.idl',
+    ]
+
--- a/content/xul/content/public/Makefile.in
+++ b/content/xul/content/public/Makefile.in
@@ -6,15 +6,9 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= xul
 
-ifdef MOZ_XUL
-XPIDLSRCS	= \
-		nsIXULContextMenuBuilder.idl \
-		$(NULL)
-endif
-
 include $(topsrcdir)/config/rules.mk
--- a/content/xul/content/public/moz.build
+++ b/content/xul/content/public/moz.build
@@ -1,5 +1,10 @@
 # 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_XUL']:
+    XPIDL_SOURCES += [
+        'nsIXULContextMenuBuilder.idl',
+    ]
+
--- a/content/xul/document/public/Makefile.in
+++ b/content/xul/document/public/Makefile.in
@@ -9,19 +9,15 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= xuldoc
 GRE_MODULE	= 1
 
 ifdef MOZ_XUL
-XPIDLSRCS += \
-		nsIXULOverlayProvider.idl \
-		$(NULL)
-
 EXPORTS		= \
 		nsIXULDocument.h \
 		$(NULL)
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/content/xul/document/public/moz.build
+++ b/content/xul/document/public/moz.build
@@ -3,8 +3,13 @@
 # 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/.
 
 XPIDL_SOURCES += [
     'nsIController.idl',
     'nsIControllers.idl',
 ]
 
+if CONFIG['MOZ_XUL']:
+    XPIDL_SOURCES += [
+        'nsIXULOverlayProvider.idl',
+    ]
+
--- a/dom/bluetooth/Makefile.in
+++ b/dom/bluetooth/Makefile.in
@@ -57,25 +57,16 @@ CPPSRCS += \
   BluetoothScoManager.cpp \
   BluetoothUuid.cpp \
   $(NULL)
 
 ifdef MOZ_B2G_RIL
 CPPSRCS += BluetoothTelephonyListener.cpp
 endif
 
-XPIDLSRCS = \
-  nsIDOMNavigatorBluetooth.idl \
-  nsIDOMBluetoothManager.idl \
-  nsIDOMBluetoothAdapter.idl \
-  nsIDOMBluetoothDevice.idl \
-  nsIDOMBluetoothDeviceEvent.idl \
-  nsIDOMBluetoothDeviceAddressEvent.idl \
-  $(NULL)
-
 ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
 VPATH += \
   $(srcdir)/linux \
   $(srcdir)/gonk \
   $(NULL)
 LOCAL_INCLUDES += $(MOZ_DBUS_CFLAGS)
 CPPSRCS += \
   BluetoothDBusService.cpp \
--- a/dom/bluetooth/moz.build
+++ b/dom/bluetooth/moz.build
@@ -8,8 +8,18 @@
 #     http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+if CONFIG['MOZ_B2G_BT']:
+    XPIDL_SOURCES += [
+        'nsIDOMNavigatorBluetooth.idl',
+        'nsIDOMBluetoothManager.idl',
+        'nsIDOMBluetoothAdapter.idl',
+        'nsIDOMBluetoothDevice.idl',
+        'nsIDOMBluetoothDeviceEvent.idl',
+        'nsIDOMBluetoothDeviceAddressEvent.idl',
+    ]
+
--- a/dom/interfaces/base/Makefile.in
+++ b/dom/interfaces/base/Makefile.in
@@ -9,29 +9,13 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= dom
 XPIDL_MODULE	= dom_base
 GRE_MODULE	= 1
 
-ifdef MOZ_DISABLE_CRYPTOLEGACY
-XPIDLSRCS += \
-	nsIDOMCrypto.idl			\
-	$(NULL)
-else
-XPIDLSRCS += \
-	nsIDOMCryptoLegacy.idl			\
-	$(NULL)
-endif
-
-ifdef MOZ_B2G
-XPIDLSRCS += \
-	nsIDOMWindowB2G.idl \
-	$(NULL)
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 XPIDL_FLAGS += \
   -I$(topsrcdir)/dom/interfaces/events \
   $(NULL)
--- a/dom/interfaces/base/moz.build
+++ b/dom/interfaces/base/moz.build
@@ -38,8 +38,22 @@ XPIDL_SOURCES += [
     'nsIFrameRequestCallback.idl',
     'nsIIdleObserver.idl',
     'nsIQueryContentEventResult.idl',
     'nsIStructuredCloneContainer.idl',
     'nsITabChild.idl',
     'nsITabParent.idl',
 ]
 
+if CONFIG['MOZ_DISABLE_CRYPTOLEGACY']:
+    XPIDL_SOURCES += [
+        'nsIDOMCrypto.idl',
+    ]
+else:
+    XPIDL_SOURCES += [
+        'nsIDOMCryptoLegacy.idl',
+    ]
+
+if CONFIG['MOZ_B2G']:
+    XPIDL_SOURCES += [
+        'nsIDOMWindowB2G.idl',
+    ]
+
--- a/dom/mobilemessage/interfaces/Makefile.in
+++ b/dom/mobilemessage/interfaces/Makefile.in
@@ -8,21 +8,15 @@ srcdir           = @srcdir@
 VPATH            = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 XPIDL_MODULE = dom_mobilemessage
 
 include $(topsrcdir)/dom/dom-config.mk
 
-ifdef MOZ_B2G_RIL
-XPIDLSRCS += \
-  nsIRilMobileMessageDatabaseService.idl \
-  $(NULL)
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 XPIDL_FLAGS += \
   -I$(topsrcdir)/dom/base \
   -I$(topsrcdir)/dom/interfaces/base \
   -I$(topsrcdir)/dom/interfaces/events \
   $(NULL)
--- a/dom/mobilemessage/interfaces/moz.build
+++ b/dom/mobilemessage/interfaces/moz.build
@@ -12,8 +12,13 @@ XPIDL_SOURCES += [
     'nsIDOMSmsManager.idl',
     'nsIDOMSmsRequest.idl',
     'nsIDOMSmsSegmentInfo.idl',
     'nsIMobileMessageDatabaseService.idl',
     'nsISmsRequest.idl',
     'nsISmsService.idl',
 ]
 
+if CONFIG['MOZ_B2G_RIL']:
+    XPIDL_SOURCES += [
+        'nsIRilMobileMessageDatabaseService.idl',
+    ]
+
--- a/dom/network/interfaces/Makefile.in
+++ b/dom/network/interfaces/Makefile.in
@@ -8,25 +8,14 @@ srcdir           = @srcdir@
 VPATH            = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 XPIDL_MODULE = dom_network
 
 include $(topsrcdir)/dom/dom-config.mk
 
-ifdef MOZ_B2G_RIL
-XPIDLSRCS += \
-  nsIDOMMobileConnection.idl \
-  nsIMobileConnectionProvider.idl \
-  nsINavigatorMobileConnection.idl \
-  nsIDOMNetworkStatsManager.idl \
-  nsIDOMNetworkStats.idl \
-  nsIDOMCFStateChangeEvent.idl \
-  $(NULL)
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 XPIDL_FLAGS += \
   -I$(topsrcdir)/dom/interfaces/base \
   -I$(topsrcdir)/dom/interfaces/events \
   $(NULL)
--- a/dom/network/interfaces/moz.build
+++ b/dom/network/interfaces/moz.build
@@ -8,8 +8,18 @@ XPIDL_SOURCES += [
     'nsIDOMDataErrorEvent.idl',
     'nsIDOMNavigatorNetwork.idl',
     'nsIDOMTCPSocket.idl',
     'nsIDOMUSSDReceivedEvent.idl',
     'nsITCPSocketChild.idl',
     'nsITCPSocketParent.idl',
 ]
 
+if CONFIG['MOZ_B2G_RIL']:
+    XPIDL_SOURCES += [
+        'nsIDOMMobileConnection.idl',
+        'nsIMobileConnectionProvider.idl',
+        'nsINavigatorMobileConnection.idl',
+        'nsIDOMNetworkStatsManager.idl',
+        'nsIDOMNetworkStats.idl',
+        'nsIDOMCFStateChangeEvent.idl',
+    ]
+
--- a/embedding/browser/webBrowser/Makefile.in
+++ b/embedding/browser/webBrowser/Makefile.in
@@ -31,18 +31,13 @@ CPPSRCS		= \
 		nsDocShellTreeOwner.cpp		\
 		nsWebBrowser.cpp		\
 		nsCommandHandler.cpp		\
         nsWebBrowserContentPolicy.cpp   \
 		nsContextMenuInfo.cpp		\
 		nsEmbedStream.cpp		\
 		$(NULL)
 
-ifdef NS_PRINTING
-SDK_XPIDLSRCS += nsIWebBrowserPrint.idl
-XPIDLSRCS     += nsIPrintingPrompt.idl nsIPrintingPromptService.idl
-endif
-
 # we don't want the shared lib, but we want to force the creation of a
 # static lib.
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/embedding/browser/webBrowser/moz.build
+++ b/embedding/browser/webBrowser/moz.build
@@ -16,8 +16,15 @@ XPIDL_SOURCES += [
     'nsIWebBrowserChrome2.idl',
     'nsIWebBrowserChrome3.idl',
     'nsIWebBrowserChromeFocus.idl',
     'nsIWebBrowserFocus.idl',
     'nsIWebBrowserSetup.idl',
     'nsIWebBrowserStream.idl',
 ]
 
+if CONFIG['NS_PRINTING']:
+    XPIDL_SOURCES += [
+        'nsIPrintingPrompt.idl',
+        'nsIPrintingPromptService.idl',
+        'nsIWebBrowserPrint.idl',
+    ]
+
--- a/extensions/pref/autoconfig/public/Makefile.in
+++ b/extensions/pref/autoconfig/public/Makefile.in
@@ -6,14 +6,10 @@ DEPTH        = @DEPTH@
 topsrcdir    = @top_srcdir@
 srcdir       = @srcdir@
 VPATH        = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE       = autoconfig
 
-ifdef MOZ_LDAP_XPCOM
-XPIDLSRCS += nsILDAPSyncQuery.idl
-endif
-
 include $(topsrcdir)/config/rules.mk
 
--- a/extensions/pref/autoconfig/public/moz.build
+++ b/extensions/pref/autoconfig/public/moz.build
@@ -3,8 +3,13 @@
 # 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/.
 
 XPIDL_SOURCES += [
     'nsIAutoConfig.idl',
     'nsIReadConfig.idl',
 ]
 
+if CONFIG['MOZ_LDAP_XPCOM']:
+    XPIDL_SOURCES += [
+        'nsILDAPSyncQuery.idl',
+    ]
+
--- a/layout/base/Makefile.in
+++ b/layout/base/Makefile.in
@@ -89,19 +89,16 @@ CPPSRCS		= \
 		nsStyleChangeList.cpp \
 		nsStyleSheetService.cpp \
 		PaintTracker.cpp \
  		PositionedEventTargeting.cpp \
 		StackArena.cpp \
 		$(NULL)
 
 ifndef MOZ_XUL
-XPIDLSRCS  += \
-		nsIBoxObject.idl \
-		$(NULL)
 EXPORTS    += \
 		nsPIBoxObject.h \
 		$(NULL)
 CPPSRCS    += \
 		nsBoxObject.cpp \
 		$(NULL)
 endif
 
--- a/layout/base/moz.build
+++ b/layout/base/moz.build
@@ -4,8 +4,13 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['tests']
 
 XPIDL_SOURCES += [
     'nsIStyleSheetService.idl',
 ]
 
+if not CONFIG['MOZ_XUL']:
+    XPIDL_SOURCES += [
+        'nsIBoxObject.idl',
+    ]
+
--- a/netwerk/base/public/Makefile.in
+++ b/netwerk/base/public/Makefile.in
@@ -9,20 +9,16 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 FAIL_ON_WARNINGS := 1
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= necko
 GRE_MODULE	= 1
 
-ifdef MOZ_TOOLKIT_SEARCH
-XPIDLSRCS	+= nsIBrowserSearchService.idl
-endif
-
 EXPORTS		= \
 		netCore.h \
 		nsNetUtil.h \
 		nsNetStrings.h \
 		nsChannelProperties.h \
 		nsURIHashKey.h \
 		nsReadLine.h \
 		nsASocketHandler.h \
--- a/netwerk/base/public/moz.build
+++ b/netwerk/base/public/moz.build
@@ -103,8 +103,13 @@ XPIDL_SOURCES += [
     'nsIURL.idl',
     'nsIURLParser.idl',
     'nsIUnicharStreamLoader.idl',
     'nsIUploadChannel.idl',
     'nsIUploadChannel2.idl',
     'nsPISocketTransportService.idl',
 ]
 
+if CONFIG['MOZ_TOOLKIT_SEARCH']:
+    XPIDL_SOURCES += [
+        'nsIBrowserSearchService.idl',
+    ]
+
--- a/netwerk/streamconv/public/Makefile.in
+++ b/netwerk/streamconv/public/Makefile.in
@@ -10,19 +10,13 @@ VPATH		= @srcdir@
 FAIL_ON_WARNINGS := 1
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= necko
 XPIDL_MODULE	= necko_strconv
 GRE_MODULE	= 1
 
-ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-XPIDLSRCS += \
-		nsIAppleFileDecoder.idl \
-		$(NULL)
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -DIMPL_NS_NET
 
 XPIDL_FLAGS += -I$(topsrcdir)/netwerk/base/public
--- a/netwerk/streamconv/public/moz.build
+++ b/netwerk/streamconv/public/moz.build
@@ -7,8 +7,13 @@ XPIDL_SOURCES += [
     'mozITXTToHTMLConv.idl',
     'nsIDirIndex.idl',
     'nsIDirIndexListener.idl',
     'nsIStreamConverter.idl',
     'nsIStreamConverterService.idl',
     'nsITXTToHTMLConv.idl',
 ]
 
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+    XPIDL_SOURCES += [
+        'nsIAppleFileDecoder.idl',
+    ]
+
--- a/security/manager/ssl/public/Makefile.in
+++ b/security/manager/ssl/public/Makefile.in
@@ -8,13 +8,9 @@ topsrcdir       = @top_srcdir@
 srcdir          = @srcdir@
 VPATH           = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = pipnss
 GRE_MODULE	= 1
 
-ifdef MOZ_XUL
-XPIDLSRCS += nsICertTree.idl
-endif
-
 include $(topsrcdir)/config/rules.mk
--- a/security/manager/ssl/public/moz.build
+++ b/security/manager/ssl/public/moz.build
@@ -52,8 +52,13 @@ XPIDL_SOURCES += [
     'nsIX509Cert2.idl',
     'nsIX509Cert3.idl',
     'nsIX509CertDB.idl',
     'nsIX509CertDB2.idl',
     'nsIX509CertList.idl',
     'nsIX509CertValidity.idl',
 ]
 
+if CONFIG['MOZ_XUL']:
+    XPIDL_SOURCES += [
+        'nsICertTree.idl',
+    ]
+
--- a/toolkit/components/alerts/Makefile.in
+++ b/toolkit/components/alerts/Makefile.in
@@ -13,16 +13,12 @@ MODULE = alerts
 LIBRARY_NAME = alerts_s
 FORCE_STATIC_LIB = 1
 LIBXUL_LIBRARY = 1
 CPPSRCS = \
   nsAlertsService.cpp \
   $(NULL)
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/components/build/
 
-ifneq (,$(filter cocoa, $(MOZ_WIDGET_TOOLKIT)))
-XPIDLSRCS += nsINotificationsList.idl
-endif
-
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/alerts/moz.build
+++ b/toolkit/components/alerts/moz.build
@@ -8,8 +8,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
     TOOL_DIRS += ['mac/growl', 'mac']
 
 TEST_DIRS += ['test']
 
 XPIDL_SOURCES += [
     'nsIAlertsService.idl',
 ]
 
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+    XPIDL_SOURCES += [
+        'nsINotificationsList.idl'
+    ]
+
--- a/toolkit/components/filepicker/Makefile.in
+++ b/toolkit/components/filepicker/Makefile.in
@@ -15,19 +15,16 @@ ifdef MOZ_XUL
 ifeq (,$(filter android qt os2 cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
 MODULE = filepicker
 LIBRARY_NAME = fileview
 SHORT_LIBNAME = fileview
 EXPORT_LIBRARY = 1
 IS_COMPONENT = 1
 MODULE_NAME = nsFileViewModule
 LIBXUL_LIBRARY = 1
-XPIDLSRCS = \
-  nsIFileView.idl \
-  $(NULL)
 CPPSRCS = \
   nsFileView.cpp \
   $(NULL)
 EXTRA_COMPONENTS = nsFilePicker.js
 EXTRA_PP_COMPONENTS = nsFilePicker.manifest
 endif
 endif
 
--- a/toolkit/components/filepicker/moz.build
+++ b/toolkit/components/filepicker/moz.build
@@ -1,5 +1,12 @@
 # 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_XUL'] and \
+    CONFIG['MOZ_WIDGET_TOOLKIT'] not in ('android', 'qt', 'os2', 'cocoa', 'windows'):
+
+        XPIDL_SOURCES += [
+            'nsIFileView.idl',
+        ]
+
--- a/toolkit/components/places/Makefile.in
+++ b/toolkit/components/places/Makefile.in
@@ -13,31 +13,16 @@ MODULE = places
 
 ifdef MOZ_PLACES
 LIBRARY_NAME  = places
 LIBXUL_LIBRARY = 1
 EXPORT_LIBRARY = 1
 MODULE_NAME = nsPlacesModule
 IS_COMPONENT = 1
 
-XPIDLSRCS += \
-  mozIAsyncHistory.idl \
-  mozIAsyncFavicons.idl \
-  mozIAsyncLivemarks.idl \
-  mozIPlacesAutoComplete.idl \
-  mozIColorAnalyzer.idl \
-  nsIAnnotationService.idl \
-  nsIBrowserHistory.idl \
-  nsIFaviconService.idl \
-  nsINavBookmarksService.idl \
-  nsITaggingService.idl  \
-  nsPIPlacesDatabase.idl \
-  nsPIPlacesHistoryListenersNotifier.idl \
-  $(NULL)
-
 EXPORTS_NAMESPACES = mozilla/places
 
 EXPORTS_mozilla/places = \
   History.h \
   Database.h \
   $(NULL)
 
 CPPSRCS = \
--- a/toolkit/components/places/moz.build
+++ b/toolkit/components/places/moz.build
@@ -5,8 +5,24 @@
 
 if CONFIG['MOZ_PLACES']:
     TEST_DIRS += ['tests']
 
 XPIDL_SOURCES += [
     'nsINavHistoryService.idl',
 ]
 
+if CONFIG['MOZ_PLACES']:
+    XPIDL_SOURCES += [
+        'mozIAsyncHistory.idl',
+        'mozIAsyncFavicons.idl',
+        'mozIAsyncLivemarks.idl',
+        'mozIPlacesAutoComplete.idl',
+        'mozIColorAnalyzer.idl',
+        'nsIAnnotationService.idl',
+        'nsIBrowserHistory.idl',
+        'nsIFaviconService.idl',
+        'nsINavBookmarksService.idl',
+        'nsITaggingService.idl ',
+        'nsPIPlacesDatabase.idl',
+        'nsPIPlacesHistoryListenersNotifier.idl',
+    ]
+
--- a/toolkit/mozapps/update/Makefile.in
+++ b/toolkit/mozapps/update/Makefile.in
@@ -13,18 +13,16 @@ MODULE = update
 
 EXTRA_COMPONENTS = \
   nsUpdateTimerManager.js \
   nsUpdateTimerManager.manifest \
   $(NULL)
 
 ifdef MOZ_UPDATER
 
-XPIDLSRCS += nsIUpdateService.idl
-
 EXTRA_PP_COMPONENTS += \
   nsUpdateService.js \
   $(NULL)
 
 EXTRA_COMPONENTS += \
   nsUpdateService.manifest \
   nsUpdateServiceStub.js \
   $(NULL)
--- a/toolkit/mozapps/update/moz.build
+++ b/toolkit/mozapps/update/moz.build
@@ -10,19 +10,23 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'andr
         # If only the maintenance service is installed and not
         # the updater, then the maintenance service may still be
         # used for other things.  We need to build update/common
         # which the maintenance service uses.
         DIRS += ['common']
 
 TEST_DIRS += ['test_timermanager']
 
+XPIDL_SOURCES += [
+    'nsIUpdateTimerManager.idl',
+]
+
 # Update tests require the updater binary
 if CONFIG['MOZ_UPDATER']:
     TEST_DIRS += ['test']
 
     if CONFIG['MOZ_MAINTENANCE_SERVICE']:
         TEST_DIRS += ['test_svc']
 
-XPIDL_SOURCES += [
-    'nsIUpdateTimerManager.idl',
-]
+    XPIDL_SOURCES += [
+        'nsIUpdateService.idl',
+    ]
 
--- a/toolkit/xre/Makefile.in
+++ b/toolkit/xre/Makefile.in
@@ -18,20 +18,16 @@ include $(topsrcdir)/config/makefiles/ma
 milestone_txt = $(topsrcdir)/config/milestone.txt
 
 MODULE = xulapp
 LIBRARY_NAME = xulapp_s
 LIBXUL_LIBRARY = 1
 
 FORCE_STATIC_LIB = 1
 
-ifeq ($(OS_ARCH),WINNT)
-XPIDLSRCS += nsIWinAppHelper.idl
-endif
-
 CPPSRCS = \
   nsAppRunner.cpp \
   nsConsoleWriter.cpp \
   nsXREDirProvider.cpp \
   nsNativeAppSupportBase.cpp \
   CreateAppData.cpp \
   nsSigHandlers.cpp \
   nsEmbedFunctions.cpp \
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
@@ -4,8 +4,13 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['test']
 
 XPIDL_SOURCES += [
     'nsINativeAppSupport.idl',
 ]
 
+if CONFIG['OS_ARCH'] == 'WINNT':
+    XPIDL_SOURCES += [
+        'nsIWinAppHelper.idl',
+    ]
+
--- a/tools/profiler/Makefile.in
+++ b/tools/profiler/Makefile.in
@@ -49,20 +49,16 @@ CPPSRCS		= \
   TableTicker2.cpp \
   UnwinderThread2.cpp \
   ProfileEntry2.cpp \
   local_debug_info_symbolizer.cc \
   JSObjectBuilder.cpp \
   JSCustomObjectBuilder.cpp \
   $(NULL)
 
-XPIDLSRCS = \
-  nsIProfiler.idl \
-  $(NULL)
-
 EXTRA_JS_MODULES = \
   Profiler.jsm \
   $(NULL)
 
 ifneq (,$(filter Android Linux,$(OS_TARGET)))
 CPPSRCS += \
   shared-libraries-linux.cc \
   platform-linux.cc \
--- a/tools/profiler/moz.build
+++ b/tools/profiler/moz.build
@@ -1,5 +1,10 @@
 # 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_ENABLE_PROFILER_SPS']:
+    XPIDL_SOURCES += [
+        'nsIProfiler.idl',
+    ]
+
--- a/widget/Makefile.in
+++ b/widget/Makefile.in
@@ -63,45 +63,12 @@ EXPORTS		+= \
 endif
 
 ifneq (,$(filter qt gtk2,$(MOZ_WIDGET_TOOLKIT)))
 EXPORTS		+= \
 		nsIPrintDialogService.h \
 		$(NULL)
 endif
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
-XPIDLSRCS	+= nsIPrintSettingsWin.idl \
-		nsIWinTaskbar.idl	\
-		nsITaskbarPreview.idl	\
-		nsITaskbarTabPreview.idl \
-		nsITaskbarWindowPreview.idl \
-		nsITaskbarPreviewController.idl \
-		nsITaskbarPreviewButton.idl \
-		nsITaskbarProgress.idl \
-		nsITaskbarOverlayIconController.idl \
-		nsIJumpListBuilder.idl \
-		nsIJumpListItem.idl \
-		$(NULL)
-endif
-
-ifdef MOZ_METRO
-XPIDLSRCS += nsIWinMetroUtils.idl \
-		MetroUIUtils.idl \
-		$(NULL)
-endif
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
-XPIDLSRCS +=	nsIMacDockSupport.idl \
-		nsIStandaloneNativeMenu.idl \
-		nsIMacWebAppUtils.idl \
-		nsITaskbarProgress.idl \
-		$(NULL)
-endif
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
-XPIDLSRCS	+= nsIRwsService.idl
-endif
-
 EXPORTS		:= $(addprefix $(srcdir)/, $(EXPORTS))
 
 include $(topsrcdir)/config/rules.mk
 
--- a/widget/moz.build
+++ b/widget/moz.build
@@ -8,16 +8,41 @@ DIRS += ['shared', 'xpwidgets']
 toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
 
 if toolkit in ('os2', 'cocoa', 'qt', 'android', 'gonk'):
     DIRS += [toolkit]
 
 if toolkit == 'windows':
     DIRS += ['windows']
 
+    XPIDL_SOURCES += [
+        'nsIJumpListBuilder.idl',
+        'nsIJumpListItem.idl',
+        'nsIPrintSettingsWin.idl',
+        'nsITaskbarPreview.idl',
+        'nsITaskbarTabPreview.idl',
+        'nsITaskbarWindowPreview.idl',
+        'nsITaskbarPreviewController.idl',
+        'nsITaskbarPreviewButton.idl',
+        'nsITaskbarProgress.idl',
+        'nsITaskbarOverlayIconController.idl',
+        'nsIWinTaskbar.idl',
+    ]
+elif toolkit == 'cocoa':
+    XPIDL_SOURCES += [
+        'nsIMacDockSupport.idl',
+        'nsIMacWebAppUtils.idl',
+        'nsIStandaloneNativeMenu.idl',
+        'nsITaskbarProgress.idl',
+    ]
+elif toolkit == 'os2':
+    XPIDL_SOURCES += [
+        'nsIRwsService.idl',
+    ]
+
 TEST_TOOL_DIRS += ['tests']
 
 # Don't build the DSO under the 'build' directory as windows does.
 #
 # The DSOs get built in the toolkit dir itself.  Do this so that
 # multiple implementations of widget can be built on the same
 # source tree.
 #
@@ -50,8 +75,14 @@ XPIDL_SOURCES += [
     'nsIPrintSettings.idl',
     'nsIPrintSettingsService.idl',
     'nsIScreen.idl',
     'nsIScreenManager.idl',
     'nsISound.idl',
     'nsITransferable.idl',
 ]
 
+if CONFIG['MOZ_METRO']:
+    XPIDL_SOURCES += [
+        'MetroUIUtils.idl',
+        'nsIWinMetroUtils.idl',
+    ]
+
--- a/xpcom/base/Makefile.in
+++ b/xpcom/base/Makefile.in
@@ -112,20 +112,16 @@ SDK_HEADERS     = \
 		nsObjCExceptions.h \
 
 ifeq ($(OS_ARCH),WINNT)
 SDK_HEADERS += \
 		nsWindowsHelpers.h \
 		$(NULL)
 endif
 
-ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-XPIDLSRCS	+= nsIMacUtils.idl
-endif
-
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
 
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 include $(topsrcdir)/config/rules.mk
 
--- a/xpcom/base/moz.build
+++ b/xpcom/base/moz.build
@@ -24,8 +24,13 @@ XPIDL_SOURCES += [
     'nsISupports.idl',
     'nsITraceRefcnt.idl',
     'nsIUUIDGenerator.idl',
     'nsIVersionComparator.idl',
     'nsIWeakReference.idl',
     'nsrootidl.idl',
 ]
 
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+    XPIDL_SOURCES += [
+        'nsIMacUtils.idl',
+    ]
+
--- a/xpcom/ds/Makefile.in
+++ b/xpcom/ds/Makefile.in
@@ -87,17 +87,16 @@ EXPORTS		= \
 		nsStringEnumerator.h \
 		nsHashPropertyBag.h \
 		nsWhitespaceTokenizer.h \
 		nsCharSeparatedTokenizer.h \
 		$(NULL)			
 
 ifeq ($(OS_ARCH),WINNT)
 CPPSRCS += nsWindowsRegKey.cpp
-XPIDLSRCS += nsIWindowsRegKey.idl
 EXPORTS += nsWindowsRegKey.h
 endif
 
 EXTRA_COMPONENTS = \
   nsINIProcessor.js \
   nsINIProcessor.manifest \
   $(NULL)
 
--- a/xpcom/ds/moz.build
+++ b/xpcom/ds/moz.build
@@ -25,8 +25,13 @@ XPIDL_SOURCES += [
     'nsISupportsArray.idl',
     'nsISupportsIterators.idl',
     'nsISupportsPrimitives.idl',
     'nsIVariant.idl',
     'nsIWritablePropertyBag.idl',
     'nsIWritablePropertyBag2.idl',
 ]
 
+if CONFIG['OS_ARCH'] == 'WINNT':
+    XPIDL_SOURCES += [
+        'nsIWindowsRegKey.idl',
+    ]
+
--- a/xpcom/io/Makefile.in
+++ b/xpcom/io/Makefile.in
@@ -94,24 +94,16 @@ EXPORTS		+= nsLocalFileUnix.h
 endif # windows
 endif # os2
 
 EXPORTS_NAMESPACES = mozilla
 EXPORTS_mozilla = \
     Base64.h \
     $(NULL)
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
-XPIDLSRCS	+= nsILocalFileOS2.idl
-else
-ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
-XPIDLSRCS	+= nsILocalFileMac.idl
-endif # cocoa
-endif # os2
-
 SDK_HEADERS =  \
 		nsDirectoryServiceDefs.h \
 		nsDirectoryServiceUtils.h \
 		$(NULL)
 
 EXPORTS		:= $(addprefix $(srcdir)/, $(EXPORTS))
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
--- a/xpcom/io/moz.build
+++ b/xpcom/io/moz.build
@@ -32,8 +32,17 @@ XPIDL_SOURCES += [
     'nsIStorageStream.idl',
     'nsIStreamBufferAccess.idl',
     'nsIStringStream.idl',
     'nsIUnicharInputStream.idl',
     'nsIUnicharLineInputStream.idl',
     'nsIUnicharOutputStream.idl',
 ]
 
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'os2':
+    XPIDL_SOURCES += [
+        'nsILocalFileOS2.idl',
+    ]
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+    XPIDL_SOURCES += [
+        'nsILocalFileMac.idl',
+    ]
+
--- a/xpcom/sample/Makefile.in
+++ b/xpcom/sample/Makefile.in
@@ -32,20 +32,16 @@ IS_COMPONENT	= 1
 MODULE_NAME	= nsSampleModule
 
 # CPPSRCS specifies C++ files to be built into a library.
 CPPSRCS		=		   \
 		nsSample.cpp	   \
 		nsSampleModule.cpp \
 		$(NULL)
 
-# XPIDLSRCS specified IDL files. The build system runs the xpidl tool on these
-# files to generate C++ headers and .xpt typelib files.
-XPIDLSRCS	= nsISample.idl
-
 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
--- a/xpcom/sample/moz.build
+++ b/xpcom/sample/moz.build
@@ -1,6 +1,11 @@
 # 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 += ['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']
+
--- a/xpcom/system/Makefile.in
+++ b/xpcom/system/Makefile.in
@@ -7,13 +7,9 @@ topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE          = xpcom
 XPIDL_MODULE    = xpcom_system
 
-ifdef MOZ_CRASHREPORTER
-XPIDLSRCS += nsICrashReporter.idl
-endif
-
 include $(topsrcdir)/config/rules.mk
--- a/xpcom/system/moz.build
+++ b/xpcom/system/moz.build
@@ -11,8 +11,13 @@ XPIDL_SOURCES += [
     'nsIGSettingsService.idl',
     'nsIGeolocationProvider.idl',
     'nsIGnomeVFSService.idl',
     'nsIHapticFeedback.idl',
     'nsIXULAppInfo.idl',
     'nsIXULRuntime.idl',
 ]
 
+if CONFIG['MOZ_CRASHREPORTER']:
+    XPIDL_SOURCES += [
+        'nsICrashReporter.idl',
+    ]
+