Bug 931459 - Move LOCAL_INCLUDES to moz.build in dom/; r=mshal
authorMs2ger <ms2ger@gmail.com>
Mon, 11 Nov 2013 09:04:11 +0100
changeset 154327 2e62a87f8cb54a8f723360062c06bf2a636e38db
parent 154326 b95200e5f556820e917e1fa3b848ab1db2bed3d8
child 154328 7d362a6225aee88f11b00c43074bd10a5095c9e1
push id36051
push useremorley@mozilla.com
push dateMon, 11 Nov 2013 13:20:35 +0000
treeherdermozilla-inbound@340bd4a68cc9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs931459
milestone28.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 931459 - Move LOCAL_INCLUDES to moz.build in dom/; r=mshal
dom/apps/src/Makefile.in
dom/apps/src/moz.build
dom/base/Makefile.in
dom/base/moz.build
dom/battery/Makefile.in
dom/battery/moz.build
dom/bindings/Makefile.in
dom/bindings/moz.build
dom/bindings/test/Makefile.in
dom/bindings/test/moz.build
dom/browser-element/Makefile.in
dom/browser-element/moz.build
dom/devicestorage/Makefile.in
dom/devicestorage/moz.build
dom/encoding/Makefile.in
dom/encoding/moz.build
dom/fmradio/ipc/Makefile.in
dom/fmradio/ipc/moz.build
dom/gamepad/Makefile.in
dom/gamepad/moz.build
dom/icc/src/Makefile.in
dom/icc/src/moz.build
dom/indexedDB/Makefile.in
dom/indexedDB/ipc/Makefile.in
dom/indexedDB/ipc/moz.build
dom/indexedDB/moz.build
dom/ipc/Makefile.in
dom/ipc/moz.build
dom/media/Makefile.in
dom/media/moz.build
dom/network/src/Makefile.in
dom/network/src/moz.build
dom/plugins/base/Makefile.in
dom/plugins/base/android/Makefile.in
dom/plugins/base/android/moz.build
dom/plugins/base/moz.build
dom/plugins/ipc/Makefile.in
dom/plugins/ipc/moz.build
dom/quota/Makefile.in
dom/quota/moz.build
dom/src/geolocation/Makefile.in
dom/src/geolocation/moz.build
dom/src/notification/Makefile.in
dom/src/notification/moz.build
dom/src/storage/Makefile.in
dom/src/storage/moz.build
dom/system/Makefile.in
dom/system/android/Makefile.in
dom/system/android/moz.build
dom/system/gonk/Makefile.in
dom/system/gonk/moz.build
dom/system/mac/Makefile.in
dom/system/mac/moz.build
dom/system/moz.build
dom/system/unix/Makefile.in
dom/system/unix/moz.build
deleted file mode 100644
--- a/dom/apps/src/Makefile.in
+++ /dev/null
@@ -1,9 +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/.
-
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/js/xpconnect/wrappers \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/apps/src/moz.build
+++ b/dom/apps/src/moz.build
@@ -38,8 +38,13 @@ EXTRA_PP_JS_MODULES += [
     'Webapps.jsm',
 ]
 
 FAIL_ON_WARNINGS = True
 
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'dom_apps_s'
+
+LOCAL_INCLUDES += [
+    '/js/xpconnect/wrappers',
+]
+
--- a/dom/base/Makefile.in
+++ b/dom/base/Makefile.in
@@ -11,18 +11,12 @@ DEFINES += -DMOZ_B2G_RIL
 endif
 
 ifdef MOZ_B2G_FM
 DEFINES += -DMOZ_B2G_FM
 endif
 
 include $(topsrcdir)/config/rules.mk
 
-LOCAL_INCLUDES += \
-		-I$(topsrcdir)/js/xpconnect/src \
-		-I$(topsrcdir)/js/xpconnect/wrappers \
-		-I$(topsrcdir)/xpcom/ds \
-		$(NULL)
-
 ifdef MOZ_X11
 CXXFLAGS += $(TK_CFLAGS)
 LDFLAGS += $(TK_LIBS)
 endif
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -144,8 +144,15 @@ LOCAL_INCLUDES += [
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     LOCAL_INCLUDES += [
         '../fmradio',
         '../system/gonk',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
+
+LOCAL_INCLUDES += [
+    '/js/xpconnect/src',
+    '/js/xpconnect/wrappers',
+    '/xpcom/ds',
+]
+
deleted file mode 100644
--- a/dom/battery/Makefile.in
+++ /dev/null
@@ -1,10 +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/.
-
-
-LOCAL_INCLUDES = \
-  -I$(topsrcdir)/content/events/src \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/battery/moz.build
+++ b/dom/battery/moz.build
@@ -18,8 +18,12 @@ SOURCES += [
 FAIL_ON_WARNINGS = True
 
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'dom_battery_s'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/content/events/src',
+]
+
--- a/dom/bindings/Makefile.in
+++ b/dom/bindings/Makefile.in
@@ -62,41 +62,16 @@ CPPSRCS = \
   CallbackInterface.cpp \
   CallbackObject.cpp \
   DOMJSProxyHandler.cpp \
   Date.cpp \
   Exceptions.cpp \
   $(NULL)
 endif
 
-LOCAL_INCLUDES += -I$(topsrcdir)/js/xpconnect/src \
-  -I$(topsrcdir)/js/xpconnect/wrappers \
-  -I$(topsrcdir)/js/ipc \
-  -I$(topsrcdir)/content/canvas/src \
-  -I$(topsrcdir)/content/html/content/src \
-  -I$(topsrcdir)/media/webrtc/signaling/src/peerconnection \
-  -I$(topsrcdir)/media/webrtc/signaling/src/common/time_profiling \
-  -I$(topsrcdir)/media/mtransport \
-  -I$(topsrcdir)/dom/base \
-  -I$(topsrcdir)/dom/battery \
-  -I$(topsrcdir)/dom/indexedDB \
-  -I$(topsrcdir)/content/xslt/src/base \
-  -I$(topsrcdir)/content/xslt/src/xpath \
-  -I$(topsrcdir)/content/xml/content/src \
-  -I$(topsrcdir)/content/xul/content/src \
-  -I$(topsrcdir)/content/xul/document/src \
-  -I$(topsrcdir)/content/media/webspeech/recognition \
-  $(NULL)
-
-ifdef MOZ_AUDIO_CHANNEL_MANAGER
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/dom/system/gonk \
-  $(NULL)
-endif
-
 ABS_DIST := $(abspath $(DIST))
 
 EXTRA_EXPORT_MDDEPEND_FILES := $(addsuffix .pp,$(binding_dependency_trackers))
 
 EXPORTS_GENERATED_FILES := $(exported_binding_headers) $(exported_generated_events_headers)
 EXPORTS_GENERATED_DEST := $(ABS_DIST)/include/$(binding_include_path)
 EXPORTS_GENERATED_TARGET := export
 INSTALL_TARGETS += EXPORTS_GENERATED
--- a/dom/bindings/moz.build
+++ b/dom/bindings/moz.build
@@ -39,24 +39,46 @@ LIBXUL_LIBRARY = True
 
 MSVC_ENABLE_PGO = True
 
 LIBRARY_NAME = 'dombindings_s'
 
 EXPORT_LIBRARY = True
 
 LOCAL_INCLUDES += [
-    '../bluetooth',
-    '../camera',
-    '../file',
-    '../src/geolocation',
-    '../workers',
     '/content/base/src',
+    '/content/canvas/src',
     '/content/events/src',
+    '/content/html/content/src',
     '/content/html/document/src',
     '/content/media/webaudio',
+    '/content/media/webspeech/recognition',
     '/content/svg/content/src',
     '/content/xbl/src',
+    '/content/xml/content/src',
+    '/content/xslt/src/base',
+    '/content/xslt/src/xpath',
+    '/content/xul/content/src',
+    '/content/xul/document/src',
+    '/dom/base',
+    '/dom/battery',
+    '/dom/bluetooth',
+    '/dom/camera',
+    '/dom/file',
+    '/dom/indexedDB',
+    '/dom/src/geolocation',
+    '/dom/workers',
+    '/js/ipc',
+    '/js/xpconnect/src',
+    '/js/xpconnect/wrappers',
     '/layout/style',
     '/layout/xul/tree',
+    '/media/mtransport',
+    '/media/webrtc/signaling/src/common/time_profiling',
+    '/media/webrtc/signaling/src/peerconnection',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
+
+if CONFIG['MOZ_AUDIO_CHANNEL_MANAGER']:
+    LOCAL_INCLUDES += [
+        '/dom/system/gonk',
+    ]
--- a/dom/bindings/test/Makefile.in
+++ b/dom/bindings/test/Makefile.in
@@ -15,22 +15,16 @@ include ../webidlsrcs.mk
 
 # But the webidl actually lives in our parent dir
 test_webidl_files := $(addprefix ../,$(test_webidl_files))
 # Store the actual locations of our source preprocessed files, so we
 # can depend on them sanely.
 source_preprocessed_test_webidl_files := $(addprefix $(srcdir)/,$(preprocessed_test_webidl_files))
 preprocessed_test_webidl_files := $(addprefix ../,$(preprocessed_test_webidl_files))
 
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/js/xpconnect/src \
-  -I$(topsrcdir)/js/xpconnect/wrappers \
-  -I$(topsrcdir)/dom/bindings \
-  $(NULL)
-
 CPPSRCS += \
   $(subst .webidl,Binding.cpp,$(test_webidl_files)) \
   $(subst .webidl,Binding.cpp,$(preprocessed_test_webidl_files)) \
   $(NULL)
 
 # If you change bindinggen_dependencies here, change it in
 # dom/bindings/Makefile.in too.  But note that we include ../Makefile
 # here manually, since $(GLOBAL_DEPS) won't cover it.
--- a/dom/bindings/test/moz.build
+++ b/dom/bindings/test/moz.build
@@ -11,8 +11,14 @@ LIBXUL_LIBRARY = True
 # being added to libxul or anything.
 
 LIBRARY_NAME = 'dombindings_test_s'
 
 MOCHITEST_MANIFESTS += ['mochitest.ini']
 
 MOCHITEST_CHROME_MANIFESTS += ['chrome.ini']
 
+LOCAL_INCLUDES += [
+    '/dom/bindings',
+    '/js/xpconnect/src',
+    '/js/xpconnect/wrappers',
+]
+
deleted file mode 100644
--- a/dom/browser-element/Makefile.in
+++ /dev/null
@@ -1,12 +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/.
-
-include $(topsrcdir)/config/rules.mk
-
-INCLUDES	+= \
-		-I$(topsrcdir)/dom/base \
-		-I$(topsrcdir)/dom/ \
-		-I$(topsrcdir)/dom/ipc \
-		-I$(topsrcdir)/content/base/src \
-		$(NULL)
--- a/dom/browser-element/moz.build
+++ b/dom/browser-element/moz.build
@@ -35,8 +35,16 @@ LIBXUL_LIBRARY = True
 LIBRARY_NAME = 'dom_browserelement_s'
 
 LOCAL_INCLUDES += [
     '../bluetooth',
     '/content/html/content/src',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
+
+LOCAL_INCLUDES += [
+    '/content/base/src',
+    '/dom/',
+    '/dom/base',
+    '/dom/ipc',
+]
+
deleted file mode 100644
--- a/dom/devicestorage/Makefile.in
+++ /dev/null
@@ -1,13 +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/.
-
-
-LOCAL_INCLUDES = \
-		-I$(topsrcdir)/dom/base \
-		-I$(topsrcdir)/dom/ipc \
-		-I$(topsrcdir)/content/base/src \
-		-I$(topsrcdir)/content/events/src \
-		$(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/devicestorage/moz.build
+++ b/dom/devicestorage/moz.build
@@ -33,8 +33,15 @@ IPDL_SOURCES += [
 FAIL_ON_WARNINGS = True
 
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'domdevicestorage_s'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/content/base/src',
+    '/content/events/src',
+    '/dom/base',
+    '/dom/ipc',
+]
+
--- a/dom/encoding/Makefile.in
+++ b/dom/encoding/Makefile.in
@@ -1,16 +1,12 @@
 # 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/.
 
-LOCAL_INCLUDES = \
-	-I$(topsrcdir)/intl/locale/src \
-	$(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 EncodingUtils.$(OBJ_SUFFIX): labelsencodings.properties.h
 FallbackEncoding.$(OBJ_SUFFIX): localesfallbacks.properties.h
 
 PROPS2ARRAYS = $(topsrcdir)/intl/locale/src/props2arrays.py
 labelsencodings.properties.h: $(PROPS2ARRAYS) labelsencodings.properties
 	$(PYTHON) $^ $@
--- a/dom/encoding/moz.build
+++ b/dom/encoding/moz.build
@@ -23,8 +23,12 @@ SOURCES += [
 ]
 
 FAIL_ON_WARNINGS = True
 
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'domencoding_s'
 
+LOCAL_INCLUDES += [
+    '/intl/locale/src',
+]
+
deleted file mode 100644
--- a/dom/fmradio/ipc/Makefile.in
+++ /dev/null
@@ -1,11 +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/.
-
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/dom/fmradio \
-  $(NULL)
-
-
-include $(topsrcdir)/config/rules.mk
-
--- a/dom/fmradio/ipc/moz.build
+++ b/dom/fmradio/ipc/moz.build
@@ -23,8 +23,13 @@ FAIL_ON_WARNINGS = True
 LIBXUL_LIBRARY = True
 LIBRARY_NAME   = 'domfmradio_s'
 
 LOCAL_INCLUDES += [
     '/dom/base',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
+
+LOCAL_INCLUDES += [
+    '/dom/fmradio',
+]
+
deleted file mode 100644
--- a/dom/gamepad/Makefile.in
+++ /dev/null
@@ -1,9 +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/.
-
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/dom/base \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/gamepad/moz.build
+++ b/dom/gamepad/moz.build
@@ -19,8 +19,12 @@ SOURCES = [
 FAIL_ON_WARNINGS = True
 
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'domgamepad_s'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/dom/base',
+]
+
deleted file mode 100644
--- a/dom/icc/src/Makefile.in
+++ /dev/null
@@ -1,9 +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/.
-
-LOCAL_INCLUDES = \
-  -I$(topsrcdir)/content/events/src \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/icc/src/moz.build
+++ b/dom/icc/src/moz.build
@@ -15,8 +15,12 @@ SOURCES += [
 FAIL_ON_WARNINGS = True
 
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'dom_icc_s'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/content/events/src',
+]
+
deleted file mode 100644
--- a/dom/indexedDB/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/.
-
-LOCAL_INCLUDES = \
-  -I$(topsrcdir)/caps/include \
-  -I$(topsrcdir)/content/base/src \
-  -I$(topsrcdir)/content/events/src \
-  -I$(topsrcdir)/db/sqlite3/src \
-  -I$(topsrcdir)/dom/base \
-  -I$(topsrcdir)/dom/src/storage \
-  -I$(topsrcdir)/dom/quota \
-  -I$(topsrcdir)/xpcom/build \
-  $(NULL)
-
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/indexedDB/ipc/Makefile.in
+++ b/dom/indexedDB/ipc/Makefile.in
@@ -1,17 +1,12 @@
 # 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/.
 
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/dom/indexedDB \
-  -I$(topsrcdir)/content/events/src \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 xpcshell_tests = unit
 
 # Copy all the normal xpcshell tests from the regular unit directory.
 copy-xpcshell-tests:
 	$(call install_cmd,$(wildcard $(topsrcdir)/dom/indexedDB/test/unit/test_*.js) \
 		$(testxpcobjdir)/$(relativesrcdir)/$(xpcshell_tests))
--- a/dom/indexedDB/ipc/moz.build
+++ b/dom/indexedDB/ipc/moz.build
@@ -35,8 +35,13 @@ FAIL_ON_WARNINGS = True
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'dom_indexeddb_ipc_s'
 
 MOCHITEST_MANIFESTS += ['mochitest.ini']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/content/events/src',
+    '/dom/indexedDB',
+]
+
--- a/dom/indexedDB/moz.build
+++ b/dom/indexedDB/moz.build
@@ -65,8 +65,19 @@ SOURCES += [
 FAIL_ON_WARNINGS = True
 
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'dom_indexeddb_s'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/caps/include',
+    '/content/base/src',
+    '/content/events/src',
+    '/db/sqlite3/src',
+    '/dom/base',
+    '/dom/quota',
+    '/dom/src/storage',
+    '/xpcom/build',
+]
+
--- a/dom/ipc/Makefile.in
+++ b/dom/ipc/Makefile.in
@@ -1,42 +1,14 @@
 # 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
 
-LOCAL_INCLUDES += \
-	-I$(srcdir)/../../content/base/src \
-	-I$(srcdir)/../../content/events/src \
-	-I$(srcdir)/../../docshell/base \
-	-I$(topsrcdir)/chrome/src \
-	-I$(topsrcdir)/uriloader/exthandler \
-	-I$(srcdir)/../../netwerk/base/src \
-	-I$(srcdir)/../src/base \
-	-I$(srcdir)/../src/geolocation \
-	-I$(srcdir)/../src/storage \
-	-I$(srcdir)/../../xpcom/base \
-	-I$(topsrcdir)/dom/indexedDB \
-	-I$(topsrcdir)/dom/indexedDB/ipc \
-	-I$(topsrcdir)/extensions/cookie \
-	-I$(topsrcdir)/dom/base \
-	-I$(topsrcdir)/toolkit/xre \
-	-I$(topsrcdir)/hal/sandbox \
-	-I$(topsrcdir)/dom/mobilemessage/src/ipc \
-	-I$(topsrcdir)/dom/devicestorage \
-	-I$(topsrcdir)/dom/fmradio/ipc \
-	-I$(topsrcdir)/widget/xpwidgets \
-	-I$(topsrcdir)/dom/bluetooth \
-	-I$(topsrcdir)/layout/base \
-	-I$(topsrcdir)/dom/bluetooth/ipc \
-	-I$(topsrcdir)/content/media/webspeech/synth/ipc \
-	-I$(topsrcdir)/js/ipc \
-	$(NULL)
-
 DEFINES += -DBIN_SUFFIX='"$(BIN_SUFFIX)"'
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),$(findstring $(MOZ_WIDGET_TOOLKIT),android gtk2 gonk qt))
 DEFINES += -DMOZ_ENABLE_FREETYPE
 endif
 
 ifdef MOZ_PERMISSIONS
 DEFINES += -DMOZ_PERMISSIONS
--- a/dom/ipc/moz.build
+++ b/dom/ipc/moz.build
@@ -76,8 +76,36 @@ FAIL_ON_WARNINGS = True
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'domipc_s'
 
 EXPORT_LIBRARY = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '../src/base',
+    '../src/geolocation',
+    '../src/storage',
+    '/chrome/src',
+    '/content/base/src',
+    '/content/events/src',
+    '/content/media/webspeech/synth/ipc',
+    '/docshell/base',
+    '/dom/base',
+    '/dom/bluetooth',
+    '/dom/bluetooth/ipc',
+    '/dom/devicestorage',
+    '/dom/fmradio/ipc',
+    '/dom/indexedDB',
+    '/dom/indexedDB/ipc',
+    '/dom/mobilemessage/src/ipc',
+    '/extensions/cookie',
+    '/hal/sandbox',
+    '/js/ipc',
+    '/layout/base',
+    '/netwerk/base/src',
+    '/toolkit/xre',
+    '/uriloader/exthandler',
+    '/widget/xpwidgets',
+    '/xpcom/base',
+]
+
deleted file mode 100644
--- a/dom/media/Makefile.in
+++ /dev/null
@@ -1,12 +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/.
-
-ifdef MOZ_WEBRTC
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/media/webrtc/trunk \
-  -I$(topsrcdir)/media/webrtc/signaling/src/common \
-  $(NULL)
-endif
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/media/moz.build
+++ b/dom/media/moz.build
@@ -2,16 +2,21 @@
 # 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_WEBRTC']:
     DIRS += ['bridge']
 
+    LOCAL_INCLUDES += [
+        '/media/webrtc/signaling/src/common',
+        '/media/webrtc/trunk',
+    ]
+
 TEST_DIRS += ['tests/mochitest', 'tests/ipc']
 
 XPIDL_SOURCES += [
     'nsIDOMMediaStream.idl',
     'nsIDOMNavigatorUserMedia.idl',
     'nsIMediaManager.idl',
 ]
 
deleted file mode 100644
--- a/dom/network/src/Makefile.in
+++ /dev/null
@@ -1,11 +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/.
-
-
-
-LOCAL_INCLUDES = \
-  -I$(topsrcdir)/content/events/src \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/network/src/moz.build
+++ b/dom/network/src/moz.build
@@ -66,8 +66,12 @@ IPDL_SOURCES += [
 FAIL_ON_WARNINGS = True
 
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'dom_network_s'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/content/events/src',
+]
+
--- a/dom/plugins/base/Makefile.in
+++ b/dom/plugins/base/Makefile.in
@@ -1,27 +1,12 @@
 #
 # 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/.
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),android)
-LOCAL_INCLUDES += -I$(topsrcdir)/dom/plugins/base/android
-endif
-
-ifeq ($(OS_ARCH),WINNT)
-	LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
-endif
+include $(topsrcdir)/config/rules.mk
 
-LOCAL_INCLUDES += \
-  -DSK_BUILD_FOR_ANDROID_NDK \
-  -I$(topsrcdir)/widget/android \
-  -I$(topsrcdir)/widget/xpwidgets \
-  -I$(topsrcdir)/xpcom/base/ \
-  -I$(topsrcdir)/gfx/skia/include/core \
-  -I$(topsrcdir)/gfx/skia/include/config \
+CXXFLAGS += \
   $(MOZ_CAIRO_CFLAGS) \
   $(MOZ_PIXMAN_CFLAGS) \
+  $(TK_CFLAGS) \
   $(NULL)
-
-include $(topsrcdir)/config/rules.mk
-
-CXXFLAGS         += $(TK_CFLAGS)
--- a/dom/plugins/base/android/Makefile.in
+++ b/dom/plugins/base/android/Makefile.in
@@ -1,18 +1,9 @@
 #
 # 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/.
 
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/widget/android \
-  -I$(topsrcdir)/widget/xpwidgets \
-  -I$(topsrcdir)/dom/plugins/base \
-  -I$(topsrcdir)/dom/plugins/base/android/include \
-  -I$(topsrcdir)/gfx/gl \
+CXXFLAGS += \
   $(MOZ_CAIRO_CFLAGS) \
   $(MOZ_PIXMAN_CFLAGS) \
   $(NULL)
-
-DEFINES += -DMOZ_APP_NAME='"$(MOZ_APP_NAME)"'
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/plugins/base/android/moz.build
+++ b/dom/plugins/base/android/moz.build
@@ -30,8 +30,17 @@ FAIL_ON_WARNINGS = True
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'gkpluginandroid_s'
 
 EXPORT_LIBRARY = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/dom/plugins/base',
+    '/dom/plugins/base/android/include',
+    '/gfx/gl',
+    '/widget/android',
+    '/widget/xpwidgets',
+]
+
+DEFINES['MOZ_APP_NAME'] = '"%s"' % CONFIG['MOZ_APP_NAME']
--- a/dom/plugins/base/moz.build
+++ b/dom/plugins/base/moz.build
@@ -101,13 +101,31 @@ MSVC_ENABLE_PGO = True
 
 LIBRARY_NAME = 'gkplugin'
 
 EXPORT_LIBRARY = True
 
 LOCAL_INCLUDES += [
     '/content/base/src',
     '/dom/base',
+    '/gfx/skia/include/config',
+    '/gfx/skia/include/core',
     '/layout/generic',
     '/layout/xul/base/src',
+    '/widget/android',
+    '/widget/xpwidgets',
+    '/xpcom/base',
 ]
 
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
+    LOCAL_INCLUDES += [
+        '/dom/plugins/base/android',
+    ]
+
+if CONFIG['OS_ARCH'] == 'WINNT':
+    LOCAL_INCLUDES += [
+        '/xpcom/base',
+    ]
+
 include('/ipc/chromium/chromium-config.mozbuild')
+
+DEFINES['SK_BUILD_FOR_ANDROID_NDK'] = True
+
--- a/dom/plugins/ipc/Makefile.in
+++ b/dom/plugins/ipc/Makefile.in
@@ -1,29 +1,10 @@
 # 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/.
 
-ifeq (WINNT,$(OS_ARCH))
-DEFINES += \
-  -DMOZ_HANGUI_PROCESS_NAME=\"plugin-hang-ui$(BIN_SUFFIX)\" \
-  $(NULL)
-endif
-
-LOCAL_INCLUDES = \
-  -I$(srcdir)/../base \
-  -I$(topsrcdir)/xpcom/base/ \
-  $(NULL)
-
-ifeq (WINNT,$(OS_ARCH))
-LOCAL_INCLUDES += \
-  -I$(srcdir)/hangui \
-  -I$(topsrcdir)/widget/shared \
-  $(NULL)
-endif
-
 include $(topsrcdir)/config/rules.mk
 
-CXXFLAGS += $(TK_CFLAGS)
-
-DEFINES += -DFORCE_PR_LOG
-
-CXXFLAGS += $(MOZ_CAIRO_CFLAGS)
+CXXFLAGS += \
+  $(TK_CFLAGS) \
+  $(MOZ_CAIRO_CFLAGS) \
+  $(NULL)
--- a/dom/plugins/ipc/moz.build
+++ b/dom/plugins/ipc/moz.build
@@ -49,16 +49,21 @@ if CONFIG['OS_ARCH'] == 'WINNT':
         'PluginSurfaceParent.h',
     ]
     SOURCES += [
         'COMMessageFilter.cpp',
         'MiniShmParent.cpp',
         'PluginHangUIParent.cpp',
         'PluginSurfaceParent.cpp',
     ]
+    DEFINES['MOZ_HANGUI_PROCESS_NAME'] = '"plugin-hang-ui%s"' % CONFIG['BIN_SUFFIX']
+    LOCAL_INCLUDES += [
+        '/widget/shared',
+        'hangui',
+    ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     EXPORTS.mozilla.plugins += [
         'PluginInterposeOSX.h',
     ]
 
 if CONFIG['MOZ_ENABLE_QT']:
     GENERATED_SOURCES += [
@@ -112,8 +117,15 @@ FAIL_ON_WARNINGS = True
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'domplugins_s'
 
 EXPORT_LIBRARY = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '../base',
+    '/xpcom/base/',
+]
+
+DEFINES['FORCE_PR_LOG'] = True
+
deleted file mode 100644
--- a/dom/quota/Makefile.in
+++ /dev/null
@@ -1,10 +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/.
-
-
-LOCAL_INCLUDES = \
-  -I$(topsrcdir)/caps/include \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/quota/moz.build
+++ b/dom/quota/moz.build
@@ -45,8 +45,12 @@ FAIL_ON_WARNINGS = True
 LIBXUL_LIBRARY = True
 
 MSVC_ENABLE_PGO = True
 
 LIBRARY_NAME = 'domquota_s'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/caps/include',
+]
+
--- a/dom/src/geolocation/Makefile.in
+++ b/dom/src/geolocation/Makefile.in
@@ -1,30 +1,9 @@
 # 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/.
 
-LOCAL_INCLUDES = \
-		-I$(topsrcdir)/dom/base \
-		-I$(topsrcdir)/dom/ipc \
-		-I$(topsrcdir)/content/base/src \
-		-I$(topsrcdir)/content/events/src \
-		$(NULL)
+include $(topsrcdir)/config/rules.mk
 
 ifdef MOZ_ENABLE_QTMOBILITY
-LOCAL_INCLUDES  += $(MOZ_QT_CFLAGS) \
-                   -I$(topsrcdir)/dom/system/unix \
-                   $(NULL)
-endif
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),android)
-LOCAL_INCLUDES  += -I$(topsrcdir)/dom/system/android
+CXXFLAGS += $(MOZ_QT_CFLAGS)
 endif
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
-LOCAL_INCLUDES  += -I$(topsrcdir)/dom/system/gonk
-endif
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
-LOCAL_INCLUDES  += -I$(topsrcdir)/dom/system/mac
-endif
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/src/geolocation/moz.build
+++ b/dom/src/geolocation/moz.build
@@ -19,8 +19,33 @@ SOURCES += [
 FAIL_ON_WARNINGS = True
 
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'jsdomgeolocation_s'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/content/base/src',
+    '/content/events/src',
+    '/dom/base',
+    '/dom/ipc',
+]
+
+if CONFIG['MOZ_ENABLE_QTMOBILITY']:
+    LOCAL_INCLUDES += [
+        '/dom/system/unix',
+    ]
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
+    LOCAL_INCLUDES += [
+        '/dom/system/android',
+    ]
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+    LOCAL_INCLUDES += [
+        '/dom/system/gonk',
+    ]
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+    LOCAL_INCLUDES += [
+        '/dom/system/mac',
+    ]
+
deleted file mode 100644
--- a/dom/src/notification/Makefile.in
+++ /dev/null
@@ -1,12 +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/.
-
-LOCAL_INCLUDES = \
-  -I$(topsrcdir)/dom/base \
-  -I$(topsrcdir)/dom/ipc \
-  -I$(topsrcdir)/content/base/src \
-  -I$(topsrcdir)/content/events/src \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/src/notification/moz.build
+++ b/dom/src/notification/moz.build
@@ -28,8 +28,15 @@ SOURCES += [
 FAIL_ON_WARNINGS = True
 
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'jsdomnotification_s'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/content/base/src',
+    '/content/events/src',
+    '/dom/base',
+    '/dom/ipc',
+]
+
deleted file mode 100644
--- a/dom/src/storage/Makefile.in
+++ /dev/null
@@ -1,14 +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/.
-
-LOCAL_INCLUDES = \
-                -I$(topsrcdir)/dom/base \
-		-I$(topsrcdir)/content/events/src
-
-ifdef ENABLE_TESTS
-DEFINES += -DDOM_STORAGE_TESTS
-endif
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/src/storage/moz.build
+++ b/dom/src/storage/moz.build
@@ -28,8 +28,15 @@ FAIL_ON_WARNINGS = True
 LIBXUL_LIBRARY = True
 
 MSVC_ENABLE_PGO = True
 
 LIBRARY_NAME = 'jsdomstorage_s'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/content/events/src',
+    '/dom/base',
+]
+
+if CONFIG['ENABLE_TESTS']:
+    DEFINES['DOM_STORAGE_TESTS'] = True
deleted file mode 100644
--- a/dom/system/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/.
-
-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 \
-  -I$(topsrcdir)/js/xpconnect/loader \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/dom/system/android/Makefile.in
+++ /dev/null
@@ -1,9 +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/.
-
-LOCAL_INCLUDES  += -I$(topsrcdir)/dom/src/geolocation \
-                     -I$(topsrcdir)/content/events/src
-                     $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/system/android/moz.build
+++ b/dom/system/android/moz.build
@@ -16,8 +16,13 @@ FAIL_ON_WARNINGS = True
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'domsystemandroid_s'
 
 EXPORT_LIBRARY = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/content/events/src',
+    '/dom/src/geolocation',
+]
+
--- a/dom/system/gonk/Makefile.in
+++ b/dom/system/gonk/Makefile.in
@@ -7,24 +7,16 @@
 #     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.
 
-LOCAL_INCLUDES = \
-  -I$(topsrcdir)/dom/base \
-  -I$(topsrcdir)/dom/src/geolocation \
-  -I$(topsrcdir)/dom/wifi \
-  -I$(topsrcdir)/dom/bluetooth \
-  -I$(topsrcdir)/content/events/src \
-  $(NULL)
-
 # TODO: Bug 908038, move this to moz.build
 WORKER_FILES := worker_buf.js \
   $(NULL)
 
 INSTALL_TARGETS += WORKER
 
 WORKER_DEST = $(FINAL_TARGET)/modules/workers
 
--- a/dom/system/gonk/moz.build
+++ b/dom/system/gonk/moz.build
@@ -88,8 +88,16 @@ if CONFIG['MOZ_B2G_RIL']:
 FAIL_ON_WARNINGS = True
 
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'domsystemgonk_s'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/content/events/src',
+    '/dom/base',
+    '/dom/bluetooth',
+    '/dom/src/geolocation',
+    '/dom/wifi',
+]
+
deleted file mode 100644
--- a/dom/system/mac/Makefile.in
+++ /dev/null
@@ -1,8 +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/.
-
-LOCAL_INCLUDES  += -I$(topsrcdir)/dom/src/geolocation \
-                   $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/system/mac/moz.build
+++ b/dom/system/mac/moz.build
@@ -13,8 +13,12 @@ FAIL_ON_WARNINGS = True
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'domsystemmac_s'
 
 EXPORT_LIBRARY = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/dom/src/geolocation',
+]
+
--- a/dom/system/moz.build
+++ b/dom/system/moz.build
@@ -53,8 +53,18 @@ FAIL_ON_WARNINGS = True
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'domsystem_s'
 
 EXPORT_LIBRARY = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
+# We fire the nsDOMDeviceAcceleration
+LOCAL_INCLUDES += [
+    '/content/events/src',
+    '/dom/base',
+    '/dom/bindings',
+    '/js/xpconnect/loader',
+]
+
+DEFINES['DLL_PREFIX'] = '"%s"' % CONFIG['DLL_PREFIX']
+DEFINES['DLL_SUFFIX'] = '"%s"' % CONFIG['DLL_SUFFIX']
--- a/dom/system/unix/Makefile.in
+++ b/dom/system/unix/Makefile.in
@@ -1,11 +1,9 @@
 # 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
+
 ifdef MOZ_ENABLE_QTMOBILITY
-LOCAL_INCLUDES  += $(MOZ_QT_CFLAGS) \
-                   -I$(topsrcdir)/dom/src/geolocation \
-                   $(NULL)
+CXXFLAGS += $(MOZ_QT_CFLAGS)
 endif
-
-include $(topsrcdir)/config/rules.mk
--- a/dom/system/unix/moz.build
+++ b/dom/system/unix/moz.build
@@ -9,16 +9,20 @@ MODULE = 'dom'
 if CONFIG['MOZ_ENABLE_QTMOBILITY']:
     GENERATED_SOURCES += [
         'moc_QTMLocationProvider.cpp',
     ]
     SOURCES += [
         'QTMLocationProvider.cpp',
     ]
 
+    LOCAL_INCLUDES += [
+        '/dom/src/geolocation',
+    ]
+
 FAIL_ON_WARNINGS = True
 
 LIBXUL_LIBRARY = True
 
 LIBRARY_NAME = 'domsystemunix_s'
 
 EXPORT_LIBRARY = True