Bug 968900 - Move LOCAL_INCLUDES to moz.build in toolkit/; r=mshal
authorMs2ger <ms2ger@gmail.com>
Sat, 15 Feb 2014 21:25:20 +0100
changeset 169406 3a37d3be57fa1b014c8ed72ac2cdcb84f9c02f1e
parent 169405 20d7a9037429b138123195e3e994a7ebbbf59459
child 169407 b8544c32df23169d117608e57775d81966d8898a
child 169412 ed8c916743a2dff35c7446e6ad9d1596f071dca4
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersmshal
bugs968900
milestone30.0a1
Bug 968900 - Move LOCAL_INCLUDES to moz.build in toolkit/; r=mshal
toolkit/components/url-classifier/Makefile.in
toolkit/components/url-classifier/moz.build
toolkit/crashreporter/client/Makefile.in
toolkit/crashreporter/client/moz.build
toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/Makefile.in
toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/moz.build
toolkit/crashreporter/google-breakpad/src/client/linux/handler/Makefile.in
toolkit/crashreporter/google-breakpad/src/client/linux/handler/moz.build
toolkit/crashreporter/google-breakpad/src/common/dwarf/Makefile.in
toolkit/crashreporter/google-breakpad/src/common/dwarf/moz.build
toolkit/mozapps/update/tests/Makefile.in
toolkit/mozapps/update/tests/moz.build
toolkit/mozapps/update/updater/Makefile.in
toolkit/mozapps/update/updater/moz.build
toolkit/xre/Makefile.in
toolkit/xre/moz.build
--- a/toolkit/components/url-classifier/Makefile.in
+++ b/toolkit/components/url-classifier/Makefile.in
@@ -1,10 +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
 
-LOCAL_INCLUDES = \
-  -I$(srcdir)/../build \
-  -I$(topsrcdir)/ipc/chromium/src \
+CXXFLAGS += \
   $(SQLITE_CFLAGS) \
   $(NULL)
--- a/toolkit/components/url-classifier/moz.build
+++ b/toolkit/components/url-classifier/moz.build
@@ -60,8 +60,14 @@ EXPORTS += [
     'nsUrlClassifierPrefixSet.h',
 ]
 
 FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 FINAL_LIBRARY = 'toolkitcomps'
+
+LOCAL_INCLUDES += [
+    '../build',
+    '/ipc/chromium/src',
+]
+
--- a/toolkit/crashreporter/client/Makefile.in
+++ b/toolkit/crashreporter/client/Makefile.in
@@ -14,47 +14,42 @@ DIST_PROGRAM = crashreporter$(BIN_SUFFIX
 MOZ_GLUE_LDFLAGS =
 MOZ_GLUE_PROGRAM_LDFLAGS =
 endif
 
 ifeq ($(OS_ARCH),WINNT)
 LIBS += \
   $(DEPTH)/toolkit/crashreporter/breakpad-windows-libxul/$(LIB_PREFIX)google_breakpad_libxul_s.$(LIB_SUFFIX)
   $(NULL)
-LOCAL_INCLUDES += -I$(srcdir)
 RCINCLUDE = crashreporter.rc
 OS_LIBS += $(call EXPAND_LIBNAME,comctl32 shell32 wininet shlwapi)
 MOZ_WINCONSOLE = 0
 endif
 
 ifeq ($(OS_ARCH),Darwin)
 OS_LIBS += -framework Cocoa
 LIBS += \
   $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/$(LIB_PREFIX)breakpad_common_s.$(LIB_SUFFIX) \
   $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/mac/$(LIB_PREFIX)breakpad_mac_common_s.$(LIB_SUFFIX) \
   $(NULL)
-
-LOCAL_INCLUDES += -I$(srcdir) -I$(srcdir)/../google-breakpad/src/common/mac/
 endif
 
 ifdef MOZ_WIDGET_GTK
 
 LIBS += \
   $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/linux/$(LIB_PREFIX)breakpad_linux_common_s.$(LIB_SUFFIX) \
   $(NULL)
-LOCAL_INCLUDES += -I$(srcdir)
 OS_CXXFLAGS += $(TK_CFLAGS) $(MOZ_GTHREAD_CFLAGS)
 OS_LIBS += $(TK_LIBS) $(MOZ_GTHREAD_LIBS)
 endif
 
 ifeq ($(OS_ARCH),SunOS)
 LIBS += \
   $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/solaris/$(LIB_PREFIX)breakpad_solaris_common_s.$(LIB_SUFFIX) \
   $(NULL)
-LOCAL_INCLUDES += -I$(srcdir)
 OS_CXXFLAGS += $(MOZ_GTK2_CFLAGS) $(MOZ_GTHREAD_CFLAGS)
 OS_LIBS += $(MOZ_GTK2_LIBS) $(MOZ_GTHREAD_LIBS)
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 ifeq ($(OS_ARCH),Darwin)
 libs::
--- a/toolkit/crashreporter/client/moz.build
+++ b/toolkit/crashreporter/client/moz.build
@@ -7,40 +7,39 @@
 if CONFIG['OS_TARGET'] != 'Android':
     PROGRAM = 'crashreporter'
 # The xpcshell test case here verifies that the CA certificate list
 
 UNIFIED_SOURCES += [
     'crashreporter.cpp',
 ]
 
+LOCAL_INCLUDES += [
+    '../google-breakpad/src',
+]
+
 if CONFIG['OS_ARCH'] == 'WINNT':
     UNIFIED_SOURCES += [
         'crashreporter_win.cpp',
     ]
     DEFINES['UNICODE'] = True
     DEFINES['_UNICODE'] = True
 elif CONFIG['OS_ARCH'] == 'Darwin':
     UNIFIED_SOURCES += [
+        'crashreporter_osx.mm',
         'crashreporter_unix_common.cpp',
     ]
+    LOCAL_INCLUDES += [
+        '../google-breakpad/src/common/mac',
+    ]
 elif CONFIG['OS_ARCH'] == 'SunOS':
     SOURCES += [
         'crashreporter_linux.cpp',
         'crashreporter_unix.cpp',
     ]
 
 if CONFIG['MOZ_ENABLE_GTK']:
     UNIFIED_SOURCES += [
         'crashreporter_gtk_common.cpp',
         'crashreporter_linux.cpp',
         'crashreporter_unix_common.cpp'
-        ]
-
-if CONFIG['OS_ARCH'] == 'Darwin':
-    UNIFIED_SOURCES += [
-        'crashreporter_osx.mm',
     ]
 
-LOCAL_INCLUDES += [
-    '../google-breakpad/src',
-]
-
deleted file mode 100644
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/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/.
-
-include $(topsrcdir)/config/rules.mk
-
-ifeq ($(OS_TARGET),Android)
-LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/
-endif
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/moz.build
@@ -10,8 +10,12 @@ UNIFIED_SOURCES += [
 ]
 
 FINAL_LIBRARY = 'xulapp_s'
 
 LOCAL_INCLUDES += [
     '/toolkit/crashreporter/google-breakpad/src',
 ]
 
+if CONFIG['OS_TARGET'] == 'Android':
+    LOCAL_INCLUDES += [
+        '/toolkit/crashreporter/google-breakpad/src/common/android/include',
+    ]
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/handler/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/handler/Makefile.in
@@ -10,13 +10,8 @@ ifdef MOZ_THUMB2 #{
 # r7 with no complaint from gcc, but the sys_clone() function marks r7
 # as a clobbered register yet gcc error's.  The generated assembly for
 # sys_clone() looks OK, so we chalk this up to a gcc/gas quirk and
 # work around it by telling gcc that the THUMB frame pointer is a
 # vanilla callee-save register.
 OS_CXXFLAGS += -fomit-frame-pointer
 MOZ_FRAMEPTR_FLAGS := -fomit-frame-pointer
 endif #}
-
-ifeq ($(OS_TARGET),Android)
-# NDK5 workarounds
-LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/
-endif
--- a/toolkit/crashreporter/google-breakpad/src/client/linux/handler/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/client/linux/handler/moz.build
@@ -13,13 +13,16 @@ UNIFIED_SOURCES += [
 XPI_NAME = 'crashreporter'
 
 FINAL_LIBRARY = 'xulapp_s'
 
 if CONFIG['OS_TARGET'] == 'Android':
     # NDK5 workarounds
     DEFINES['_STLP_CONST_CONSTRUCTOR_BUG'] = True
     DEFINES['_STLP_NO_MEMBER_TEMPLATES'] = True
+    LOCAL_INCLUDES += [
+        '/toolkit/crashreporter/google-breakpad/src/common/android/include',
+    ]
 
 LOCAL_INCLUDES += [
     '/toolkit/crashreporter/google-breakpad/src',
 ]
 
--- a/toolkit/crashreporter/google-breakpad/src/common/dwarf/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/common/dwarf/Makefile.in
@@ -1,13 +1,7 @@
 # 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_CRASHREPORTER
-
-LOCAL_INCLUDES 	= -I$(srcdir)/../..
-
-endif
-
 # This code is only compiled for build-time tools,
 # so enabling RTTI should be fine.
 HOST_CXXFLAGS += -funsigned-char -frtti
--- a/toolkit/crashreporter/google-breakpad/src/common/dwarf/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/dwarf/moz.build
@@ -7,11 +7,14 @@
 if CONFIG['MOZ_CRASHREPORTER']:
     HOST_LIBRARY_NAME = 'host_breakpad_dwarf_s'
     HOST_SOURCES += [
         'bytereader.cc',
         'dwarf2diehandler.cc',
         'dwarf2reader.cc',
         'functioninfo.cc',
     ]
+    LOCAL_INCLUDES += [
+        '../..',
+    ]
 
 # need static lib
 FORCE_STATIC_LIB = True
--- a/toolkit/mozapps/update/tests/Makefile.in
+++ b/toolkit/mozapps/update/tests/Makefile.in
@@ -60,22 +60,16 @@ chrome-data_DEST    := $(CHROMETESTROOT)
 chrome-data_FILES   := $(addprefix $(srcdir)/data/,$(_CHROME_DATA))
 
 INI_TEST_FILES = \
   TestAUSReadStrings1.ini \
   TestAUSReadStrings2.ini \
   TestAUSReadStrings3.ini \
   $(NULL)
 
-LOCAL_INCLUDES += \
-  -I$(srcdir) \
-  -I$(topsrcdir)/toolkit/mozapps/update \
-  -I$(topsrcdir)/toolkit/mozapps/update/common \
-  $(NULL)
-
 MOZ_WINCONSOLE = 1
 
 ifeq ($(OS_ARCH),WINNT)
 LIBS += $(call EXPAND_LIBNAME_PATH,updatecommon-standalone,../common-standalone)
 else
 LIBS += $(call EXPAND_LIBNAME_PATH,updatecommon,../common)
 endif
 
--- a/toolkit/mozapps/update/tests/moz.build
+++ b/toolkit/mozapps/update/tests/moz.build
@@ -17,16 +17,21 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'andr
         'TestAUSHelper',
         'TestAUSReadStrings',
     ]
 
     SOURCES += [
         '%s.cpp' % s for s in SIMPLE_PROGRAMS
     ]
 
+    LOCAL_INCLUDES += [
+        '/toolkit/mozapps/update',
+        '/toolkit/mozapps/update/common',
+    ]
+
 for var in ('MOZ_APP_NAME', 'MOZ_APP_BASENAME', 'MOZ_APP_DISPLAYNAME',
             'MOZ_APP_VENDOR', 'BIN_SUFFIX', 'MOZ_DEBUG'):
     DEFINES[var] = CONFIG[var]
 
 DEFINES['NS_NO_XPCOM'] = True
 
 if CONFIG['MOZ_MAINTENANCE_SERVICE']:
     DEFINES['MOZ_MAINTENANCE_SERVICE'] = CONFIG['MOZ_MAINTENANCE_SERVICE']
--- a/toolkit/mozapps/update/updater/Makefile.in
+++ b/toolkit/mozapps/update/updater/Makefile.in
@@ -72,21 +72,16 @@ libs::
 	rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/updater.app 
 	sed -e 's/%APP_NAME%/$(MOZ_APP_DISPLAYNAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | \
 	  iconv -f UTF-8 -t UTF-16 > $(DIST)/bin/updater.app/Contents/Resources/English.lproj/InfoPlist.strings
 	$(NSINSTALL) -D $(DIST)/bin/updater.app/Contents/MacOS
 	$(NSINSTALL) $(DIST)/bin/updater $(DIST)/bin/updater.app/Contents/MacOS
 	rm -f $(DIST)/bin/updater
 endif
 
-ifeq (,$(filter-out WINNT,$(OS_ARCH)))
-# Pick up nsWindowsRestart.cpp
-LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
-endif
-
 ifeq ($(OS_ARCH),WINNT)
 EXTRA_LIBS += $(call EXPAND_LIBNAME,crypt32)
 EXTRA_LIBS += $(call EXPAND_LIBNAME,advapi32)
 endif
 
 CXXFLAGS += $(MOZ_BZ2_CFLAGS)
 
 ifneq (,$(filter beta release esr,$(MOZ_UPDATE_CHANNEL)))
--- a/toolkit/mozapps/update/updater/moz.build
+++ b/toolkit/mozapps/update/updater/moz.build
@@ -19,16 +19,21 @@ if CONFIG['OS_ARCH'] == 'WINNT':
         'loaddlls.cpp',
         'progressui_win.cpp',
         'win_dirent.cpp',
     ]
     DEFINES['UNICODE'] = True
     DEFINES['_UNICODE'] = True
     USE_STATIC_LIBS = True
 
+    # Pick up nsWindowsRestart.cpp
+    LOCAL_INCLUDES += [
+        '/toolkit/xre',
+    ]
+
 if CONFIG['MOZ_ENABLE_GTK']:
     have_progressui = 1
     SOURCES += [
         'progressui_gtk.cpp',
     ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     have_progressui = 1
--- a/toolkit/xre/Makefile.in
+++ b/toolkit/xre/Makefile.in
@@ -5,20 +5,16 @@
 # 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/.
 
 USE_RCS_MK=1
 include $(topsrcdir)/config/makefiles/makeutils.mk
 
 milestone_txt = $(topsrcdir)/config/milestone.txt
 
-ifdef MOZ_ENABLE_XREMOTE
-LOCAL_INCLUDES += -I$(topsrcdir)/widget/xremoteclient
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
 
 ifdef MOZ_WIDGET_GTK
 CXXFLAGS += $(MOZ_PANGO_CFLAGS)
 endif
 
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
@@ -149,8 +149,13 @@ LOCAL_INCLUDES += [
     '/config',
     '/dom/base',
     '/dom/ipc',
     '/testing/gtest/mozilla',
     '/toolkit/crashreporter',
     '/xpcom/build',
 ]
 
+if CONFIG['MOZ_ENABLE_XREMOTE']:
+    LOCAL_INCLUDES += [
+        '/widget/xremoteclient',
+    ]
+