Bug 937224 - Part d: Move LOCAL_INCLUDES to moz.build in image/; r=mshal
authorMs2ger <ms2ger@gmail.com>
Thu, 28 Nov 2013 15:17:27 +0100
changeset 172628 ea18e92d28d64961fc166a44eb9d51fcc216d081
parent 172627 125b9012ac8559728f74c7c25d100b0aa8e52ecf
child 172629 6d2b1212727ef9dd96e8c2966ec81b2017789641
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 d: Move LOCAL_INCLUDES to moz.build in image/; r=mshal
image/build/Makefile.in
image/build/moz.build
image/decoders/icon/Makefile.in
image/decoders/icon/gtk/Makefile.in
image/decoders/icon/moz.build
image/decoders/icon/qt/Makefile.in
image/src/Makefile.in
image/src/moz.build
deleted file mode 100644
--- a/image/build/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. \
-		-I$(srcdir)/../src \
-		-I$(srcdir)/../encoders/ico \
-		-I$(srcdir)/../encoders/png \
-		-I$(srcdir)/../encoders/jpeg \
-		-I$(srcdir)/../encoders/bmp \
-		$(NULL)
--- a/image/build/moz.build
+++ b/image/build/moz.build
@@ -8,8 +8,16 @@ SOURCES += [
     'nsImageModule.cpp',
 ]
 
 LIBRARY_NAME = 'imglib2'
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'xul'
+LOCAL_INCLUDES += [
+    '../encoders/bmp',
+    '../encoders/ico',
+    '../encoders/jpeg',
+    '../encoders/png',
+    '../src',
+]
+
deleted file mode 100644
--- a/image/decoders/icon/Makefile.in
+++ /dev/null
@@ -1,30 +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_WIDGET_GTK
-PLATFORM = gtk
-endif
-
-ifneq (,$(filter qt,$(MOZ_WIDGET_TOOLKIT)))
-PLATFORM = qt
-endif
-
-ifeq ($(OS_ARCH),WINNT)
-PLATFORM = win
-endif
-
-ifeq ($(OS_ARCH),OS2)
-PLATFORM = os2
-endif
-
-ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-PLATFORM = mac
-endif
-
-ifeq ($(OS_TARGET),Android)
-PLATFORM = android
-endif
-
-LOCAL_INCLUDES	= -I$(srcdir)/$(PLATFORM)
--- a/image/decoders/icon/gtk/Makefile.in
+++ b/image/decoders/icon/gtk/Makefile.in
@@ -1,10 +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/.
 
+include $(topsrcdir)/config/rules.mk
 
 ifdef MOZ_ENABLE_GNOMEUI
-LOCAL_INCLUDES += $(MOZ_GNOMEUI_CFLAGS)
+CXXFLAGS += $(MOZ_GNOMEUI_CFLAGS)
 else
-LOCAL_INCLUDES += $(TK_CFLAGS)
+CXXFLAGS += $(TK_CFLAGS)
 endif
--- a/image/decoders/icon/moz.build
+++ b/image/decoders/icon/moz.build
@@ -16,8 +16,30 @@ UNIFIED_SOURCES += [
     'nsIconURI.cpp',
 ]
 
 LIBRARY_NAME = 'imgicon'
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'xul'
+
+platform = None
+
+if CONFIG['MOZ_WIDGET_GTK']:
+    platform = 'gtk'
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
+    platform = 'qt'
+
+if CONFIG['OS_ARCH'] == 'WINNT':
+    platform = 'win'
+elif CONFIG['OS_ARCH'] == 'OS2':
+    platform = 'os2'
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+    platform = 'mac'
+
+if CONFIG['OS_TARGET'] == 'Android':
+    platform = 'android'
+
+if platform:
+    LOCAL_INCLUDES += [platform]
--- a/image/decoders/icon/qt/Makefile.in
+++ b/image/decoders/icon/qt/Makefile.in
@@ -1,5 +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/.
 
-LOCAL_INCLUDES += $(MOZ_QT_CFLAGS)
+include $(topsrcdir)/config/rules.mk
+
+CXXFLAGS += $(MOZ_QT_CFLAGS)
--- a/image/src/Makefile.in
+++ b/image/src/Makefile.in
@@ -1,24 +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/.
 
-# We need to instantiate the decoders
-LOCAL_INCLUDES += -I$(topsrcdir)/image/decoders
-
-# For URI-related functionality
-LOCAL_INCLUDES += -I$(topsrcdir)/netwerk/base/src
-
-# Because SVGDocumentWrapper.cpp includes "mozilla/dom/SVGSVGElement.h"
-LOCAL_INCLUDES += \
-			-I$(topsrcdir)/content/svg/content/src \
-			-I$(topsrcdir)/content/base/src \
-			$(NULL)
-
-# Because VectorImage.cpp includes nsSVGUtils.h and nsSVGEffects.h
-LOCAL_INCLUDES += -I$(topsrcdir)/layout/svg
-
 include $(topsrcdir)/config/rules.mk
 
 # Because imgFrame.cpp includes "cairo.h"
 CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_PIXMAN_CFLAGS)
--- a/image/src/moz.build
+++ b/image/src/moz.build
@@ -43,8 +43,20 @@ SOURCES += [
     'RasterImage.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'imglib2'
+
+LOCAL_INCLUDES += [
+    # Because SVGDocumentWrapper.cpp includes "mozilla/dom/SVGSVGElement.h"
+    '/content/base/src',
+    '/content/svg/content/src',
+    # We need to instantiate the decoders
+    '/image/decoders',
+    # Because VectorImage.cpp includes nsSVGUtils.h and nsSVGEffects.h
+    '/layout/svg',
+    # For URI-related functionality
+    '/netwerk/base/src',
+]