Bug 937224 - Part g: Move LOCAL_INCLUDES to moz.build in netwerk/; r=mshal
authorMs2ger <ms2ger@gmail.com>
Thu, 28 Nov 2013 15:25:39 +0100
changeset 172631 0836e2aa8b3276f7944439f75b3bdcc1bfb9852f
parent 172630 ed472e7df8d08b50266505b7e6ea159447b19bc5
child 172632 7dac3d93eeffa83d296a44e99fb78ccc6414c7ff
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs937224
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 937224 - Part g: Move LOCAL_INCLUDES to moz.build in netwerk/; r=mshal
netwerk/build/Makefile.in
netwerk/build/moz.build
netwerk/cache/Makefile.in
netwerk/cache/moz.build
netwerk/cookie/Makefile.in
netwerk/cookie/moz.build
netwerk/dns/Makefile.in
netwerk/dns/moz.build
netwerk/ipc/Makefile.in
netwerk/ipc/moz.build
netwerk/protocol/about/Makefile.in
netwerk/protocol/about/moz.build
netwerk/protocol/app/Makefile.in
netwerk/protocol/app/moz.build
netwerk/protocol/data/Makefile.in
netwerk/protocol/data/moz.build
netwerk/protocol/device/Makefile.in
netwerk/protocol/device/moz.build
netwerk/protocol/file/Makefile.in
netwerk/protocol/file/moz.build
netwerk/protocol/ftp/Makefile.in
netwerk/protocol/ftp/moz.build
netwerk/protocol/http/Makefile.in
netwerk/protocol/http/moz.build
netwerk/protocol/res/Makefile.in
netwerk/protocol/res/moz.build
netwerk/protocol/rtsp/Makefile.in
netwerk/protocol/rtsp/moz.build
netwerk/protocol/viewsource/Makefile.in
netwerk/protocol/viewsource/moz.build
netwerk/protocol/websocket/Makefile.in
netwerk/protocol/websocket/moz.build
netwerk/protocol/wyciwyg/Makefile.in
netwerk/protocol/wyciwyg/moz.build
netwerk/sctp/datachannel/Makefile.in
netwerk/sctp/datachannel/moz.build
netwerk/sctp/src/Makefile.in
netwerk/sctp/src/moz.build
netwerk/srtp/src/Makefile.in
netwerk/srtp/src/moz.build
netwerk/streamconv/converters/Makefile.in
netwerk/streamconv/converters/moz.build
netwerk/system/android/Makefile.in
netwerk/system/android/moz.build
netwerk/system/qt/Makefile.in
netwerk/system/qt/moz.build
deleted file mode 100644
--- a/netwerk/build/Makefile.in
+++ /dev/null
@@ -1,46 +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$(srcdir)/../base/src \
-  -I$(srcdir)/../dns \
-  -I$(srcdir)/../socket \
-  -I$(srcdir)/../streamconv/src \
-  -I$(srcdir)/../streamconv/converters \
-  -I$(srcdir)/../mime \
-  -I$(srcdir)/../cache \
-  -I$(srcdir)/../protocol/about \
-  -I$(srcdir)/../protocol/app \
-  -I../dns \
-  $(foreach d,$(filter-out about,$(NECKO_PROTOCOLS)), \
-    -I$(srcdir)/../protocol/$(d)) \
-  $(NULL)
-
-ifeq ($(OS_ARCH),WINNT)
-    LOCAL_INCLUDES += -I$(srcdir)/../system/win32
-endif
-
-ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-    LOCAL_INCLUDES += -I$(srcdir)/../system/mac
-endif
-
-ifdef MOZ_ENABLE_QTNETWORK
-    LOCAL_INCLUDES += -I$(srcdir)/../system/qt
-endif
-
-ifeq (android,$(MOZ_WIDGET_TOOLKIT))
-    LOCAL_INCLUDES += -I$(srcdir)/../system/android
-endif
-
-ifdef NECKO_COOKIES
-LOCAL_INCLUDES += -I$(srcdir)/../cookie
-endif
-
-ifdef NECKO_WIFI
-LOCAL_INCLUDES += -I$(srcdir)/../wifi
-
-endif
-
-include $(topsrcdir)/config/rules.mk
--- a/netwerk/build/moz.build
+++ b/netwerk/build/moz.build
@@ -16,8 +16,65 @@ FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 LIBRARY_NAME = 'necko'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
+
+LOCAL_INCLUDES += [
+    '../base/src',
+    '../cache',
+    '../dns',
+    '../mime',
+    '../protocol/about',
+    '../protocol/app',
+    '../socket',
+    '../streamconv/converters',
+    '../streamconv/src',
+]
+
+protocols = CONFIG['NECKO_PROTOCOLS'].copy()
+protocols.remove("about")
+LOCAL_INCLUDES += sorted([
+    '../protocol/%s' % d for d in protocols
+])
+
+if CONFIG['OS_ARCH'] == 'WINNT':
+    LOCAL_INCLUDES += [
+        '../system/win32',
+    ]
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+    LOCAL_INCLUDES += [
+        '../system/mac',
+    ]
+
+if CONFIG['MOZ_ENABLE_QTNETWORK']:
+    LOCAL_INCLUDES += [
+        '../system/qt',
+    ]
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
+    LOCAL_INCLUDES += [
+        '../system/android',
+    ]
+
+if CONFIG['NECKO_COOKIES']:
+    LOCAL_INCLUDES += [
+        '../cookie',
+    ]
+
+if CONFIG['NECKO_WIFI']:
+    LOCAL_INCLUDES += [
+        '../wifi',
+    ]
+
+if CONFIG['MOZ_RTSP']:
+    LOCAL_INCLUDES += [
+        '../protocol/rtsp',
+    ]
+
+GENERATED_INCLUDES += [
+    '../dns',
+]
deleted file mode 100644
--- a/netwerk/cache/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$(srcdir)/../base/src \
-  $(NULL)
--- a/netwerk/cache/moz.build
+++ b/netwerk/cache/moz.build
@@ -40,8 +40,12 @@ SOURCES += [
     'nsMemoryCacheDevice.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 FINAL_LIBRARY = 'necko'
+
+LOCAL_INCLUDES += [
+    '../base/src',
+]
deleted file mode 100644
--- a/netwerk/cookie/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/.
-
-ifdef NECKO_COOKIES
-
-LOCAL_INCLUDES	= \
-		-I$(topsrcdir)/intl/uconv/src \
-		$(NULL)
-
-endif
-
-
-include $(topsrcdir)/config/rules.mk
--- a/netwerk/cookie/moz.build
+++ b/netwerk/cookie/moz.build
@@ -24,23 +24,25 @@ if CONFIG['NECKO_COOKIES']:
         'CookieServiceParent.h',
     ]
     SOURCES += [
         'CookieServiceChild.cpp',
         'CookieServiceParent.cpp',
         'nsCookie.cpp',
         'nsCookieService.cpp',
     ]
+    LOCAL_INCLUDES += [
+        '/intl/uconv/src',
+    ]
 
-if CONFIG['NECKO_COOKIES']:
     XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
 
-# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
-if CONFIG['NECKO_COOKIES'] and CONFIG['OS_ARCH'] != 'Darwin':
-    XPCSHELL_TESTS_MANIFESTS += ['test/unit_ipc/xpcshell.ini']
+    # FIXME/bug 575918: out-of-process xpcshell is broken on OS X
+    if CONFIG['OS_ARCH'] != 'Darwin':
+        XPCSHELL_TESTS_MANIFESTS += ['test/unit_ipc/xpcshell.ini']
 
 IPDL_SOURCES = [
     'PCookieService.ipdl',
 ]
 
 FAIL_ON_WARNINGS = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
--- a/netwerk/dns/Makefile.in
+++ b/netwerk/dns/Makefile.in
@@ -1,17 +1,11 @@
 #
 # 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/.
 
-# need to include etld_data.inc
-LOCAL_INCLUDES = \
-  -I$(srcdir)/../base/src \
-  -I. \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 # Generate the include file containing compact, static definitions
 # for effective TLD data.
 etld_data.inc: $(srcdir)/prepare_tlds.py $(srcdir)/effective_tld_names.dat
 	$(PYTHON) $(srcdir)/prepare_tlds.py $(srcdir)/effective_tld_names.dat > etld_data.inc
--- a/netwerk/dns/moz.build
+++ b/netwerk/dns/moz.build
@@ -37,8 +37,13 @@ FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 FINAL_LIBRARY = 'necko'
 
 GENERATED_FILES = [
     'etld_data.inc',
 ]
+
+# need to include etld_data.inc
+LOCAL_INCLUDES += [
+    '../base/src',
+]
deleted file mode 100644
--- a/netwerk/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$(srcdir)/../protocol/http \
-  -I$(srcdir)/../base/src          \
-  -I$(topsrcdir)/modules/libjar    \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/netwerk/ipc/moz.build
+++ b/netwerk/ipc/moz.build
@@ -36,8 +36,14 @@ IPDL_SOURCES = [
     'PRtspController.ipdl',
 ]
 
 FAIL_ON_WARNINGS = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'necko'
+
+LOCAL_INCLUDES += [
+    '../base/src',
+    '../protocol/http',
+    '/modules/libjar',
+]
deleted file mode 100644
--- a/netwerk/protocol/about/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$(srcdir)/../../base/src \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/netwerk/protocol/about/moz.build
+++ b/netwerk/protocol/about/moz.build
@@ -22,8 +22,12 @@ SOURCES += [
     'nsAboutProtocolHandler.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'necko'
+
+LOCAL_INCLUDES += [
+    '../../base/src',
+]
deleted file mode 100644
--- a/netwerk/protocol/app/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$(srcdir)/../../base/src \
-  -I$(srcdir)/../../../modules/libjar \
-  $(NULL)
--- a/netwerk/protocol/app/moz.build
+++ b/netwerk/protocol/app/moz.build
@@ -6,8 +6,13 @@
 
 SOURCES += [
     'AppProtocolHandler.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'necko'
+LOCAL_INCLUDES += [
+    '../../../modules/libjar',
+    '../../base/src',
+]
+
deleted file mode 100644
--- a/netwerk/protocol/data/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$(srcdir)/../../base/src \
-  $(NULL)
--- a/netwerk/protocol/data/moz.build
+++ b/netwerk/protocol/data/moz.build
@@ -7,8 +7,12 @@
 UNIFIED_SOURCES += [
     'nsDataChannel.cpp',
     'nsDataHandler.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'necko'
+LOCAL_INCLUDES += [
+    '../../base/src',
+]
+
deleted file mode 100644
--- a/netwerk/protocol/device/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$(srcdir)/../../base/src/ \
-                 $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/netwerk/protocol/device/moz.build
+++ b/netwerk/protocol/device/moz.build
@@ -18,8 +18,12 @@ UNIFIED_SOURCES += [
     'nsDeviceProtocolHandler.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'necko'
+
+LOCAL_INCLUDES += [
+    '../../base/src/',
+]
deleted file mode 100644
--- a/netwerk/protocol/file/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$(srcdir)/../../base/src \
-  -I$(topsrcdir)/xpcom/ds \
-  $(NULL)
--- a/netwerk/protocol/file/moz.build
+++ b/netwerk/protocol/file/moz.build
@@ -16,8 +16,13 @@ UNIFIED_SOURCES += [
     'nsFileProtocolHandler.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 FINAL_LIBRARY = 'necko'
+
+LOCAL_INCLUDES += [
+    '../../base/src',
+    '/xpcom/ds',
+]
deleted file mode 100644
--- a/netwerk/protocol/ftp/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$(srcdir)/../../base/src \
-  -I$(topsrcdir)/xpcom/ds \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/netwerk/protocol/ftp/moz.build
+++ b/netwerk/protocol/ftp/moz.build
@@ -34,8 +34,13 @@ IPDL_SOURCES += [
 
 FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'necko'
+
+LOCAL_INCLUDES += [
+    '../../base/src',
+    '/xpcom/ds',
+]
deleted file mode 100644
--- a/netwerk/protocol/http/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$(srcdir)/../../base/src \
-  -I$(topsrcdir)/xpcom/ds \
-  -I$(topsrcdir)/content/base/src \
-  -I$(topsrcdir)/content/events/src \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/netwerk/protocol/http/moz.build
+++ b/netwerk/protocol/http/moz.build
@@ -97,8 +97,15 @@ EXTRA_COMPONENTS += [
 
 FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'necko'
+
+LOCAL_INCLUDES += [
+    '../../base/src',
+    '/content/base/src',
+    '/content/events/src',
+    '/xpcom/ds',
+]
deleted file mode 100644
--- a/netwerk/protocol/res/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)/netwerk/base/src \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/netwerk/protocol/res/moz.build
+++ b/netwerk/protocol/res/moz.build
@@ -16,8 +16,12 @@ SOURCES += [
 
 FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'necko'
+
+LOCAL_INCLUDES += [
+    '/netwerk/base/src',
+]
--- a/netwerk/protocol/rtsp/Makefile.in
+++ b/netwerk/protocol/rtsp/Makefile.in
@@ -1,31 +1,19 @@
 # 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@
-
-include $(DEPTH)/config/autoconf.mk
-
-LOCAL_INCLUDES = \
-  -I$(srcdir)/../../base/src \
-  -I$(topsrcdir)/content/base/src \
-  -I$(topsrcdir)/content/events/src \
-  -I$(topsrcdir)/xpcom/ds \
-  -I$(srcdir) \
-  -I$(srcdir)/rtsp \
-  -I$(srcdir)/controller \
-  $(NULL)
+include $(topsrcdir)/config/rules.mk
 
 ifeq ($(ANDROID_VERSION),$(findstring $(ANDROID_VERSION),15))
-LOCAL_INCLUDES += -I$(ANDROID_SOURCE)/frameworks/base/media/libstagefright/mpeg2ts \
-                  $(NULL)
+CXXFLAGS += \
+  -I$(ANDROID_SOURCE)/frameworks/base/media/libstagefright/mpeg2ts \
+  $(NULL)
 else
-LOCAL_INCLUDES += -I$(ANDROID_SOURCE)/frameworks/av/media/libstagefright/mpeg2ts \
-                  $(NULL)
+CXXFLAGS += \
+  -I$(ANDROID_SOURCE)/frameworks/av/media/libstagefright/mpeg2ts \
+  $(NULL)
 endif
 
-include $(topsrcdir)/config/rules.mk
-
-DEFINES += -Wno-multichar
+CXXFLAGS += \
+  -Wno-multichar \
+  $(NULL)
--- a/netwerk/protocol/rtsp/moz.build
+++ b/netwerk/protocol/rtsp/moz.build
@@ -46,10 +46,22 @@ SOURCES += [
 FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'necko'
 
+DEFINES['IMPL_NS_NET'] = True
+DEFINES['FORCE_PR_LOG'] = True
+
+LOCAL_INCLUDES += [
+    '../../base/src',
+    '/content/base/src',
+    '/content/events/src',
+    '/xpcom/ds',
+    'controller',
+    'rtsp',
+]
+
 for var in ('IMPL_NS_NET', 'FORCE_PR_LOG'):
     DEFINES[var] = True
deleted file mode 100644
--- a/netwerk/protocol/viewsource/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$(srcdir)/../../base/src \
-  $(NULL)
--- a/netwerk/protocol/viewsource/moz.build
+++ b/netwerk/protocol/viewsource/moz.build
@@ -13,8 +13,12 @@ XPIDL_MODULE = 'necko_viewsource'
 UNIFIED_SOURCES += [
     'nsViewSourceChannel.cpp',
     'nsViewSourceHandler.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'necko'
+LOCAL_INCLUDES += [
+    '../../base/src',
+]
+
deleted file mode 100644
--- a/netwerk/protocol/websocket/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$(srcdir)/../../base/src \
-  -I$(topsrcdir)/content/base/src \
-  -I$(topsrcdir)/content/events/src \
-  -I$(topsrcdir)/xpcom/ds \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/netwerk/protocol/websocket/moz.build
+++ b/netwerk/protocol/websocket/moz.build
@@ -33,8 +33,15 @@ IPDL_SOURCES += [
 
 FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'necko'
+
+LOCAL_INCLUDES += [
+    '../../base/src',
+    '/content/base/src',
+    '/content/events/src',
+    '/xpcom/ds',
+]
deleted file mode 100644
--- a/netwerk/protocol/wyciwyg/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$(srcdir)/../../base/src \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/netwerk/protocol/wyciwyg/moz.build
+++ b/netwerk/protocol/wyciwyg/moz.build
@@ -29,8 +29,12 @@ IPDL_SOURCES += [
     'PWyciwygChannel.ipdl',
 ]
 
 FAIL_ON_WARNINGS = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'necko'
+
+LOCAL_INCLUDES += [
+    '../../base/src',
+]
--- a/netwerk/sctp/datachannel/Makefile.in
+++ b/netwerk/sctp/datachannel/Makefile.in
@@ -1,13 +1,6 @@
 #
 # 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/.
 
 NO_PROFILE_GUIDED_OPTIMIZE = 1 # Don't PGO
-LOCAL_INCLUDES = \
-  -I$(topsrcdir)/xpcom/ds \
-  -I$(srcdir)/../src \
-  -I$(DEPTH)/dist/include/mozilla/net \
-  -I$(topsrcdir)/media/webrtc/trunk/third_party/libjingle/source \
-  -I$(topsrcdir)/media/mtransport \
-  $(NULL)
--- a/netwerk/sctp/datachannel/moz.build
+++ b/netwerk/sctp/datachannel/moz.build
@@ -17,16 +17,23 @@ SOURCES += [
 ]
 
 FAIL_ON_WARNINGS = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'necko'
 
+LOCAL_INCLUDES += [
+    '../src',
+    '/media/mtransport',
+    '/media/webrtc/trunk/third_party/libjingle/source',
+    '/xpcom/ds',
+]
+
 DEFINES['INET'] = 1
 DEFINES['SCTP_DEBUG'] = 1
 
 if CONFIG['OS_TARGET'] != 'Android':
     DEFINES['INET6'] = 1
 
 if CONFIG['OS_TARGET'] == 'WINNT':
     DEFINES['__Userspace_os_Windows'] = 1
--- a/netwerk/sctp/src/Makefile.in
+++ b/netwerk/sctp/src/Makefile.in
@@ -6,23 +6,16 @@
 VPATH     = \
   @srcdir@ \
   @srcdir@/netinet \
   @srcdir@/netinet6 \
   $(NULL)
 
 NO_PROFILE_GUIDED_OPTIMIZE = 1 # Don't PGO
 
-LOCAL_INCLUDES = \
-  -I$(srcdir)/../../base/src \
-  -I$(topsrcdir)/content/base/src \
-  -I$(topsrcdir)/content/events/src \
-  -I$(topsrcdir)/xpcom/ds \
-  $(NULL)
-
 ifeq ($(OS_TARGET),Darwin)
 DEFINES += \
   -U__APPLE__ \
   $(NULL)
 else
 ifeq ($(OS_TARGET),FreeBSD)
 DEFINES += \
   -U__FreeBSD__ \
--- a/netwerk/sctp/src/moz.build
+++ b/netwerk/sctp/src/moz.build
@@ -44,16 +44,23 @@ if CONFIG['OS_TARGET'] == 'Android':
     ]
 
 LIBRARY_NAME = 'nksctp_s'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'necko'
 
+LOCAL_INCLUDES += [
+    '../../base/src',
+    '/content/base/src',
+    '/content/events/src',
+    '/xpcom/ds',
+]
+
 for var in ('SCTP_SIMPLE_ALLOCATOR', 'USE_SCTP_SHA1',
             'SCTP_PROCESS_LEVEL_LOCKS', '__Userspace__', 'INET',
             'CALLBACK_API', 'SCTP_DEBUG'):
     DEFINES[var] = 1
 
 # Android NDK r5c, used on the builders at the time of this writing, doesn't
 # have the headers we need for IPv6
 if CONFIG['OS_TARGET'] != 'Android':
--- a/netwerk/srtp/src/Makefile.in
+++ b/netwerk/srtp/src/Makefile.in
@@ -10,18 +10,13 @@ VPATH = \
   @srcdir@/crypto/cipher \
   @srcdir@/crypto/hash \
   @srcdir@/crypto/kernel \
   @srcdir@/crypto/math \
   @srcdir@/crypto/replay \
   @srcdir@/crypto/rng \
   $(NULL)
 
-LOCAL_INCLUDES = \
-  -I$(srcdir)/include \
-  -I$(srcdir)/crypto/include \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 ifdef GNU_CC
 CFLAGS += -std=gnu99
 endif
--- a/netwerk/srtp/src/moz.build
+++ b/netwerk/srtp/src/moz.build
@@ -34,16 +34,21 @@ UNIFIED_SOURCES += [
 ]
 
 LIBRARY_NAME = 'nksrtp_s'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'necko'
 
+LOCAL_INCLUDES += [
+    'crypto/include',
+    'include',
+]
+
 # We know stdint.h will define uint8/16/32/64_t, so we don't need
 # to define SIZEOF_UNSIGNED_LONG/SIZEOF_UNSIGNED_LONG_LONG
 for var in ('HAVE_STDLIB_H', 'HAVE_UINT8_T', 'HAVE_UINT16_T',
             'HAVE_UINT32_T', 'HAVE_UINT64_T'):
     DEFINES[var] = 1
 
 # XXX while arm is not a CISC architecture, the code guarded by CPU_RISC makes
 # (at least) the AES ciphers fail their self-tests on ARM, so for now we're
deleted file mode 100644
--- a/netwerk/streamconv/converters/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)/netwerk/base/src \
-        $(NULL)
--- a/netwerk/streamconv/converters/moz.build
+++ b/netwerk/streamconv/converters/moz.build
@@ -26,8 +26,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'coco
         'nsBinHexDecoder.cpp',
     ]
 
 FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 FINAL_LIBRARY = 'necko'
+
+LOCAL_INCLUDES += [
+    '/netwerk/base/src',
+]
deleted file mode 100644
--- a/netwerk/system/android/Makefile.in
+++ /dev/null
@@ -1,7 +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
-
-LOCAL_INCLUDES += -I$(srcdir)/../../base/src
--- a/netwerk/system/android/moz.build
+++ b/netwerk/system/android/moz.build
@@ -6,8 +6,12 @@
 
 SOURCES += [
     'nsAndroidNetworkLinkService.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'necko'
+LOCAL_INCLUDES += [
+    '../../base/src',
+]
+
--- a/netwerk/system/qt/Makefile.in
+++ b/netwerk/system/qt/Makefile.in
@@ -1,9 +1,8 @@
 #
 # 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
 
 OS_INCLUDES += $(MOZ_QT_CFLAGS)
-LOCAL_INCLUDES += -I$(srcdir)/../../base/src
--- a/netwerk/system/qt/moz.build
+++ b/netwerk/system/qt/moz.build
@@ -11,8 +11,12 @@ SOURCES += [
 
 GENERATED_SOURCES += [
     'moc_nsQtNetworkManager.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'necko'
+LOCAL_INCLUDES += [
+    '../../base/src',
+]
+