Bug 973405 - Move some misc LOCAL_INCLUDES to moz.build; r=glandium
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 18 Feb 2014 08:49:12 -0500
changeset 169338 eed4ef04aa7647fd00d1d08fb36fa3812affb5e1
parent 169337 a5f5a8abb5aac37ef54337709281ec15a1ecf3e4
child 169339 158d923965d33df79a7257a1a669dd6c44b75c5f
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersglandium
bugs973405
milestone30.0a1
Bug 973405 - Move some misc LOCAL_INCLUDES to moz.build; r=glandium
db/sqlite3/src/Makefile.in
dom/bindings/test/Makefile.in
dom/bindings/test/moz.build
mobile/android/app/Makefile.in
mobile/android/app/moz.build
modules/libmar/verify/Makefile.in
modules/libmar/verify/moz.build
security/sandbox/Makefile.in
security/sandbox/moz.build
storage/build/Makefile.in
storage/build/moz.build
storage/src/Makefile.in
storage/src/moz.build
uriloader/exthandler/Makefile.in
uriloader/exthandler/moz.build
--- a/db/sqlite3/src/Makefile.in
+++ b/db/sqlite3/src/Makefile.in
@@ -40,11 +40,8 @@ endif
 
 # Force /O2 optimisation on Windows because using the default /O1 causes
 # crashes with MSVC2005 and PGO. See bug 719584.
 ifeq ($(OS_ARCH),WINNT)
 MODULE_OPTIMIZE_FLAGS = -O2
 endif
 
 include $(topsrcdir)/config/rules.mk
-
-# next line allows use of MOZ_OBJDIR in .mozconfig with older gcc on BeOS, maybe others
-LOCAL_INCLUDES += -I$(srcdir)
--- a/dom/bindings/test/Makefile.in
+++ b/dom/bindings/test/Makefile.in
@@ -8,17 +8,17 @@ include ../webidlsrcs.mk
 # TODO Update this variable in backend.mk.
 CPPSRCS += $(addprefix ../,$(test_sources))
 
 ifdef GNU_CC
 OS_CXXFLAGS += -Wno-uninitialized
 endif
 
 # Bug 932082 tracks having bindings use namespaced includes.
-LOCAL_INCLUDES += -I$(DIST)/include/mozilla/dom -I..
+LOCAL_INCLUDES += -I$(DIST)/include/mozilla/dom
 
 # Include rules.mk before any of our targets so our first target is coming from
 # rules.mk and running make with no target in this dir does the right thing.
 include $(topsrcdir)/config/rules.mk
 
 check::
 	PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
 	  $(PLY_INCLUDE) $(srcdir)/../parser/runtests.py
--- a/dom/bindings/test/moz.build
+++ b/dom/bindings/test/moz.build
@@ -31,13 +31,14 @@ PREPROCESSED_TEST_WEBIDL_FILES += [
     'TestJSImplGen.webidl',
 ]
 
 WEBIDL_EXAMPLE_INTERFACES += [
     'TestExampleInterface',
     'TestExampleProxyInterface',
 ]
 
+GENERATED_INCLUDES += ['..']
 LOCAL_INCLUDES += [
     '/dom/bindings',
     '/js/xpconnect/src',
     '/js/xpconnect/wrappers',
 ]
--- a/mobile/android/app/Makefile.in
+++ b/mobile/android/app/Makefile.in
@@ -3,22 +3,16 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 dist_dest = $(DIST)/$(APP_NAME).app
 
 PREF_JS_EXPORTS = $(srcdir)/mobile.js
 
 ifndef LIBXUL_SDK
 ifneq (Android,$(OS_TARGET))
-
-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 += \
   $(XPCOM_STANDALONE_GLUE_LDOPTS) \
   $(NULL)
 
 endif
 endif #LIBXUL_SDK
--- a/mobile/android/app/moz.build
+++ b/mobile/android/app/moz.build
@@ -3,16 +3,22 @@
 # 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 not CONFIG['LIBXUL_SDK']:
     if CONFIG['OS_TARGET'] != 'Android':
         PROGRAM = CONFIG['MOZ_APP_NAME']
         DEFINES['XPCOM_GLUE'] = True
+        GENERATED_INCLUDES += ['/build']
+        LOCAL_INCLUDES += [
+            '/toolkit/xre',
+            '/xpcom/base',
+            '/xpcom/build',
+        ]
 
 for var in ('APP_NAME', 'APP_VERSION'):
     DEFINES[var] = CONFIG['MOZ_%s' % var]
 
 for var in ('MOZ_UPDATER', 'MOZ_APP_UA_NAME'):
     DEFINES[var] = CONFIG[var]
 
 if CONFIG['MOZ_PKG_SPECIAL']:
--- a/modules/libmar/verify/Makefile.in
+++ b/modules/libmar/verify/Makefile.in
@@ -1,14 +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/.
 
-# This makefile just builds support for reading archives.
-ifneq ($(OS_ARCH),WINNT)
-LOCAL_INCLUDES += -I$(srcdir)/../sign
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 # The intermediate (.ii/.s) files for host and target can have the same name...
 # disable parallel builds
 .NOTPARALLEL:
--- a/modules/libmar/verify/moz.build
+++ b/modules/libmar/verify/moz.build
@@ -12,13 +12,14 @@ UNIFIED_SOURCES += [
 ]
 
 FORCE_STATIC_LIB = True
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     USE_STATIC_LIBS = True
 else:
     DEFINES['MAR_NSS'] = True
+    LOCAL_INCLUDES += ['../sign']
 
 LOCAL_INCLUDES += [
     '../src',
 ]
 
--- a/security/sandbox/Makefile.in
+++ b/security/sandbox/Makefile.in
@@ -1,21 +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/.
 
 ifeq ($(OS_ARCH),WINNT)
-
-LOCAL_INCLUDES += \
-    -I$(topsrcdir)/security/sandbox/chromium/base/shim \
-    -I$(topsrcdir)/security/sandbox/chromium \
-    -I$(topsrcdir)/security \
-    -I$(topsrcdir)/nsprpub \
-    $(NULL)
-
 EXTRA_SDK_DECLS = $(topsrcdir)/security/sandbox/chromium/base/shim/sdkdecls.h
 
 ifdef _MSC_VER
 OS_CXXFLAGS += -FI $(EXTRA_SDK_DECLS)
 else
 OS_CXXFLAGS += -include $(EXTRA_SDK_DECLS)
 endif
 
--- a/security/sandbox/moz.build
+++ b/security/sandbox/moz.build
@@ -118,8 +118,13 @@ elif CONFIG['OS_ARCH'] == 'WINNT':
         'win/src/win_utils.cc',
         'win/src/window.cc',
         'win/src/Wow64.cc',
     ]
 
     for var in ('UNICODE', '_UNICODE', 'NS_NO_XPCOM', 'SANDBOX_EXPORTS',
                 'NOMINMAX', '_CRT_RAND_S'):
         DEFINES[var] = True
+
+    LOCAL_INCLUDES += ['/security/sandbox/chromium/base/shim']
+    LOCAL_INCLUDES += ['/security/sandbox/chromium']
+    LOCAL_INCLUDES += ['/security']
+    LOCAL_INCLUDES += ['/nsprpub']
--- a/storage/build/Makefile.in
+++ b/storage/build/Makefile.in
@@ -1,8 +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/.
 
-LOCAL_INCLUDES = \
-	$(SQLITE_CFLAGS) \
-	-I$(srcdir)/../src
+CXXFLAGS += $(SQLITE_CFLAGS)
--- a/storage/build/moz.build
+++ b/storage/build/moz.build
@@ -12,8 +12,10 @@ SOURCES += [
     'mozStorageModule.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 LIBRARY_NAME = 'storagecomps'
 
 FINAL_LIBRARY = 'xul'
+
+LOCAL_INCLUDES += ['../src']
--- a/storage/src/Makefile.in
+++ b/storage/src/Makefile.in
@@ -1,11 +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/.
 
-# For nsDependentJSString
-LOCAL_INCLUDES = \
-  $(SQLITE_CFLAGS) \
-  -I$(topsrcdir)/db/sqlite3/src \
-  -I$(topsrcdir)/dom/base \
-  $(NULL)
+CXXFLAGS += $(SQLITE_CFLAGS)
--- a/storage/src/moz.build
+++ b/storage/src/moz.build
@@ -54,8 +54,13 @@ FINAL_LIBRARY = 'storagecomps'
 # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
 if CONFIG['MOZ_MEMORY'] and not CONFIG['MOZ_NATIVE_SQLITE']:
     if CONFIG['OS_TARGET'] != 'Android':
         DEFINES['MOZ_STORAGE_MEMORY'] = True
 
 # This is the default value.  If we ever change it when compiling sqlite, we
 # will need to change it here as well.
 DEFINES['SQLITE_MAX_LIKE_PATTERN_LENGTH'] = 50000
+
+LOCAL_INCLUDES += [
+    '/db/sqlite3/src',
+    '/dom/base',
+]
--- a/uriloader/exthandler/Makefile.in
+++ b/uriloader/exthandler/Makefile.in
@@ -1,17 +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/.
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
-LOCAL_INCLUDES += -I$(srcdir)/win
-endif
-
 ifdef MOZ_ENABLE_DBUS
 OS_INCLUDES   += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS)
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 ifneq (,$(filter qt gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT)))
 CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
--- a/uriloader/exthandler/moz.build
+++ b/uriloader/exthandler/moz.build
@@ -16,16 +16,17 @@ XPIDL_SOURCES += [
     'nsIHandlerService.idl',
     'nsIHelperAppLauncherDialog.idl',
 ]
 
 XPIDL_MODULE = 'exthandler'
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     osdir = 'win'
+    LOCAL_INCLUDES += ['win']
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     osdir = 'win'
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
     osdir = 'android'
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     osdir = 'gonk'
 else:
     osdir = 'unix'