Bug 968631 - Port some LOCAL_INCLUDES variables to moz.build; r=mshal
authorEhsan Akhgari <ehsan.akhgari@gmail.com>
Mon, 10 Feb 2014 13:41:02 -0500
changeset 167949 db6c1f75a2677161705972403d2f80eaeae19a08
parent 167948 ff7fd36c4a22ddc03a92c5595369c1a9a2d1e49f
child 167950 42207a3dae807b31a15054cd73def482a97a32c6
push id26194
push userryanvm@gmail.com
push dateTue, 11 Feb 2014 13:39:41 +0000
treeherderautoland@edd724161ab4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs968631
milestone30.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 968631 - Port some LOCAL_INCLUDES variables to moz.build; r=mshal
b2g/app/Makefile.in
b2g/app/moz.build
browser/app/Makefile.in
browser/app/moz.build
browser/components/about/Makefile.in
browser/components/about/moz.build
browser/components/build/Makefile.in
browser/components/build/moz.build
browser/components/dirprovider/Makefile.in
browser/components/dirprovider/moz.build
chrome/src/Makefile.in
chrome/src/moz.build
hal/Makefile.in
hal/moz.build
ipc/app/Makefile.in
ipc/app/moz.build
toolkit/library/Makefile.in
toolkit/library/moz.build
--- a/b2g/app/Makefile.in
+++ b/b2g/app/Makefile.in
@@ -22,24 +22,18 @@ LIBS += \
   $(NULL)
 ifeq ($(ANDROID_VERSION),$(findstring $(ANDROID_VERSION),17 18 19))
 LIBS += \
   -lgui \
   -lsuspend \
   $(NULL)
 endif
 OS_LDFLAGS += -Wl,--export-dynamic
-LOCAL_INCLUDES += -I$(topsrcdir)/widget/gonk/libdisplay
 endif
 
-LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
-LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
-LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
-LOCAL_INCLUDES += -I$(DEPTH)/build
-
 STL_FLAGS=
 
 LIBS += $(JEMALLOC_LIBS)
 
 LIBS += \
   $(XPCOM_STANDALONE_GLUE_LDOPTS) \
   $(NULL)
 
--- a/b2g/app/moz.build
+++ b/b2g/app/moz.build
@@ -15,8 +15,23 @@ if not CONFIG['LIBXUL_SDK']:
 
 if CONFIG['ENABLE_MARIONETTE']:
     DEFINES['ENABLE_MARIONETTE'] = 1
 
 DEFINES['XPCOM_GLUE'] = True
 
 for var in ('MOZ_APP_NAME', 'MOZ_APP_VERSION', 'MOZ_UPDATER'):
     DEFINES[var] = CONFIG[var]
+
+GENERATED_INCLUDES += [
+    '/build',
+]
+
+LOCAL_INCLUDES += [
+    '/toolkit/xre',
+    '/xpcom/base',
+    '/xpcom/build',
+]
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+    LOCAL_INCLUDES += [
+        '/widget/gonk/libdisplay',
+    ]
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -21,23 +21,16 @@ DEFINES += \
   $(NULL)
 
 ifdef LIBXUL_SDK #{
 PREF_JS_EXPORTS += $(srcdir)/profile/channel-prefs.js
 endif #} LIBXUL_SDK
 
 # Build a binary bootstrapping with XRE_main
 
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/toolkit/xre \
-  -I$(topsrcdir)/xpcom/base \
-  -I$(topsrcdir)/xpcom/build \
-  -I$(DEPTH)/build \
-  $(NULL)
-
 STL_FLAGS=
 
 LIBS += \
 	$(XPCOM_STANDALONE_GLUE_LDOPTS) \
 	$(NULL)
 
 ifdef MOZ_LINKER
 LIBS += $(MOZ_ZLIB_LIBS)
--- a/browser/app/moz.build
+++ b/browser/app/moz.build
@@ -17,8 +17,18 @@ if CONFIG['ENABLE_MARIONETTE']:
 
 DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
 
 for var in ('MOZILLA_OFFICIAL', 'LIBXUL_SDK'):
     if CONFIG[var]:
         DEFINES[var] = True
 
 DEFINES['XPCOM_GLUE'] = True
+
+GENERATED_INCLUDES += [
+    '/build',
+]
+
+LOCAL_INCLUDES += [
+    '/toolkit/xre',
+    '/xpcom/base',
+    '/xpcom/build',
+]
deleted file mode 100644
--- a/browser/components/about/Makefile.in
+++ /dev/null
@@ -1,5 +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)/../build
--- a/browser/components/about/moz.build
+++ b/browser/components/about/moz.build
@@ -8,8 +8,12 @@ EXPORTS.mozilla.browser += [
     'AboutRedirector.h',
 ]
 
 SOURCES += [
     'AboutRedirector.cpp',
 ]
 
 FINAL_LIBRARY = 'browsercomps'
+
+LOCAL_INCLUDES += [
+    '../build',
+]
--- a/browser/components/build/Makefile.in
+++ b/browser/components/build/Makefile.in
@@ -1,34 +1,25 @@
 # 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 ($(OS_ARCH),WINNT)
 OS_LIBS	+= $(call EXPAND_LIBNAME,ole32 shell32 shlwapi)
 endif
 
-LOCAL_INCLUDES = \
-	-I$(srcdir)/../shell/src \
-	-I$(srcdir)/../feeds/src \
-	-I$(srcdir)/../about \
-	-I$(srcdir)/../dirprovider \
-	$(NULL)
-
 ifeq ($(OS_ARCH),WINNT)
 OS_LIBS += $(call EXPAND_LIBNAME,version)
 endif
 
 EXTRA_DSO_LDOPTS += \
 	$(XPCOM_GLUE_LDOPTS) \
 	$(MOZ_COMPONENT_LIBS) \
 	$(NULL)
 
-LOCAL_INCLUDES += -I$(srcdir)/../migration/src
-
 # Mac: Need to link with CoreFoundation for Mac Migrators (PList reading code)
 # GTK2: Need to link with glib for GNOME shell service
 ifneq (,$(filter cocoa gtk2 gtk3,$(MOZ_WIDGET_TOOLKIT)))
 EXTRA_DSO_LDOPTS += \
   $(TK_LIBS) \
   $(NULL)
 endif
 
--- a/browser/components/build/moz.build
+++ b/browser/components/build/moz.build
@@ -12,8 +12,16 @@ SOURCES += [
     'nsModule.cpp',
 ]
 
 LIBRARY_NAME = 'browsercomps'
 
 IS_COMPONENT = True
 
 FORCE_SHARED_LIB = True
+
+LOCAL_INCLUDES += [
+    '../about',
+    '../dirprovider',
+    '../feeds/src',
+    '../migration/src',
+    '../shell/src',
+]
deleted file mode 100644
--- a/browser/components/dirprovider/Makefile.in
+++ /dev/null
@@ -1,5 +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)/../build
--- a/browser/components/dirprovider/moz.build
+++ b/browser/components/dirprovider/moz.build
@@ -12,8 +12,12 @@ SOURCES += [
     'DirectoryProvider.cpp',
 ]
 
 XPCSHELL_TESTS_MANIFESTS += [
     'tests/unit/xpcshell.ini',
 ]
 
 FINAL_LIBRARY = 'browsercomps'
+
+LOCAL_INCLUDES += [
+    '../build'
+]
--- a/chrome/src/Makefile.in
+++ b/chrome/src/Makefile.in
@@ -1,20 +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/.
 
 include $(topsrcdir)/config/rules.mk
 
-LOCAL_INCLUDES += \
-		-I$(topsrcdir)/netwerk/protocol/res \
-		-I$(topsrcdir)/netwerk/base/src \
-		$(NULL)
-
 ifdef MOZ_ENABLE_GTK
 CXXFLAGS          += $(TK_CFLAGS)
 endif
-
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/xpcom/components \
-  -I$(DEPTH)/xpcom \
-  $(NULL)
--- a/chrome/src/moz.build
+++ b/chrome/src/moz.build
@@ -15,8 +15,18 @@ UNIFIED_SOURCES += [
     'nsChromeRegistryContent.cpp',
 ]
 
 MSVC_ENABLE_PGO = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xpcom_core'
+
+GENERATED_INCLUDES += [
+    '/xpcom',
+]
+
+LOCAL_INCLUDES += [
+    '/netwerk/base/src',
+    '/netwerk/protocol/res',
+    '/xpcom/components'
+]
--- a/hal/Makefile.in
+++ b/hal/Makefile.in
@@ -1,20 +1,13 @@
 #
 # 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_GAMEPAD
-LOCAL_INCLUDES = -I$(topsrcdir)/dom/base
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 CFLAGS          += $(GLIB_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
 CXXFLAGS        += $(GLIB_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
 
 ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
-# So that we can call nsScreenManagerGonk::GetConfiguration().
-LOCAL_INCLUDES += -I$(topsrcdir)/widget/gonk
-LOCAL_INCLUDES += -I$(topsrcdir)/widget/xpwidgets
-LOCAL_INCLUDES += -I$(ANDROID_SOURCE)/hardware/libhardware_legacy/include
+  LOCAL_INCLUDES += -I$(ANDROID_SOURCE)/hardware/libhardware_legacy/include
 endif
--- a/hal/moz.build
+++ b/hal/moz.build
@@ -171,8 +171,20 @@ IPDL_SOURCES = [
     'sandbox/PHal.ipdl',
 ]
 
 FAIL_ON_WARNINGS = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
+
+if CONFIG['MOZ_GAMEPAD']:
+    LOCAL_INCLUDES += [
+        '/dom/base',
+    ]
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+    # So that we can call nsScreenManagerGonk::GetConfiguration().
+    LOCAL_INCLUDES += [
+        '/widget/gonk',
+        '/widget/xpwidgets'
+    ]
--- a/ipc/app/Makefile.in
+++ b/ipc/app/Makefile.in
@@ -17,19 +17,16 @@ endif
 
 ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
 LIBS += \
   -lbinder \
   -lutils \
   $(NULL)
 endif
 
-LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
-LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
-
 ifndef MOZ_WINCONSOLE
 ifdef MOZ_DEBUG
 MOZ_WINCONSOLE = 1
 else
 MOZ_WINCONSOLE = 0
 endif
 endif
 
@@ -49,21 +46,16 @@ include $(topsrcdir)/config/rules.mk
 
 LDFLAGS += $(MOZ_ALLOW_HEAP_EXECUTE_FLAGS)
 
 ifeq ($(OS_ARCH),WINNT) #{
 
 ifdef MOZ_CONTENT_SANDBOX
 LIBS += ../../security/sandbox/$(LIB_PREFIX)sandbox_s.$(LIB_SUFFIX)
 LIBS += $(NSPR_LIBS)
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/security/ \
-  -I$(topsrcdir)/security/sandbox \
-  -I$(topsrcdir)/security/sandbox/chromium \
-  $(NULL)
 endif
 
 # Note the manifest file exists in the tree, so we use the explicit filename
 # here.
 EXTRA_DEPS += plugin-container.exe.manifest
 #
 # Control the default heap size.
 # This is the heap returned by GetProcessHeap().
--- a/ipc/app/moz.build
+++ b/ipc/app/moz.build
@@ -12,8 +12,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
     ]
     FINAL_TARGET = 'dist/bin/lib'
 else:
     SOURCES += [
         'MozillaRuntimeMain.cpp',
     ]
 include('/ipc/chromium/chromium-config.mozbuild')
 
+LOCAL_INCLUDES += [
+    '/toolkit/xre',
+    '/xpcom/base',
+]
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -11,39 +11,32 @@ SHARED_LIBRARY_NAME=XUL
 # Setting MAKE_FRAMEWORK makes DLL_PREFIX and DLL_SUFFIX be ignored when
 # setting SHARED_LIBRARY; we need to leave DLL_PREFIX and DLL_SUFFIX
 # as-is so that dependencies of the form -ltracemalloc still work.
 MAKE_FRAMEWORK=1
 endif
 
 ifdef MOZ_CONTENT_SANDBOX
 ifeq ($(OS_ARCH),WINNT)
-  LOCAL_INCLUDES += -I$(srcdir)/../sandboxbroker
   SHARED_LIBRARY_LIBS += ../../security/sandbox/win/src/sandboxbroker/$(LIB_PREFIX)sandboxbroker.$(LIB_SUFFIX)
 endif
 endif
 
 # COMPONENT_LIBS is mosly useless since bug 935881, but is kept for
 # MOZ_APP_COMPONENT_LIBS, used by comm-central, and gtest linking.
 SHARED_LIBRARY_LIBS += \
   $(foreach component,$(COMPONENT_LIBS),$(DEPTH)/staticlib/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \
   $(NULL)
 
 ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
 RCINCLUDE = xulrunner.rc
-
-LOCAL_INCLUDES += -I$(topsrcdir)/widget/windows
-LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
 endif
 
 ifeq ($(OS_ARCH),OS2)
 RCFLAGS += -i $(topsrcdir)/widget/os2
-
-LOCAL_INCLUDES += -I$(topsrcdir)/widget/os2
-LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
 endif
 
 # dependent libraries
 ifdef MOZ_B2G_BT_BLUEZ #{
 ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
 OS_LIBS += -ldbus
 endif
 endif #}
@@ -299,22 +292,16 @@ EFFECTIVE_LIB_PREFIX=$(DLL_PREFIX)
 EFFECTIVE_LIB_SUFFIX=$(DLL_SUFFIX)
 endif
 
 GTEST_LIB = $(EFFECTIVE_LIB_PREFIX)gtest/$(EFFECTIVE_LIB_PREFIX)$(SHARED_LIBRARY_NAME)$(EFFECTIVE_LIB_SUFFIX)
 EXTRA_MDDEPEND_FILES = $(GTEST_LIB).pp
 
 include $(topsrcdir)/config/rules.mk
 
-# need widget/windows for resource.h (included from widget.rc)
-LOCAL_INCLUDES += \
-  -I$(topsrcdir)/config \
-  -I$(topsrcdir)/widget/windows \
-  $(NULL)
-
 OS_LIBS += $(LIBICONV)
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 OS_LIBS += $(call EXPAND_LIBNAME,usp10 oleaut32)
 endif
 
 ifeq (WINNT_1,$(OS_TARGET)_$(MOZ_PROFILE_USE))
 # Wrap linker to measure peak virtual memory usage.
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -9,16 +9,21 @@ LIBRARY_NAME = 'xul'
 SOURCES += [
     'nsStaticXULComponents.cpp',
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     SOURCES += [
         'nsDllMain.cpp',
     ]
+    if not CONFIG['GNU_CC']:
+        LOCAL_INCLUDES += [
+	    '/widget/windows',
+	    '/xpcom/base',
+	]
 
 # component libraries
 additional_defines = (
     'MOZ_AUTH_EXTENSION',
     'MOZ_GIO_COMPONENT',
     'MOZ_JSDEBUGGER',
     'MOZ_PERMISSIONS',
     'MOZ_PREF_EXTENSIONS',