Bug 973402 - Move the LOCAL_INCLUDES in js/src to moz.build; r=glandium
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 18 Feb 2014 01:09:30 -0500
changeset 169593 658a158fa8688938f0ad3dcbc7de0c6b43de22d6
parent 169592 1a4c5d3a814c2244895985514014260336436ef3
child 169594 dd6e74de885572e2122500b145102ef5ef48357f
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersglandium
bugs973402
milestone30.0a1
Bug 973402 - Move the LOCAL_INCLUDES in js/src to moz.build; r=glandium
js/src/Makefile.in
js/src/gdb/Makefile.in
js/src/gdb/moz.build
js/src/jsapi-tests/Makefile.in
js/src/jsapi-tests/moz.build
js/src/moz.build
js/src/shell/Makefile.in
js/src/shell/moz.build
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -24,18 +24,16 @@ DIST_INSTALL = 1
 
 ifdef JS_STANDALONE
 SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,mfbt,$(DEPTH)/mfbt)
 endif
 
 ifdef JS_HAS_CTYPES
 ifdef MOZ_NATIVE_FFI
 LOCAL_INCLUDES = $(MOZ_FFI_CFLAGS)
-else
-LOCAL_INCLUDES = -Ictypes/libffi/include
 endif
 
 ifdef MOZ_NATIVE_FFI
 EXTRA_DSO_LDOPTS += $(MOZ_FFI_LIBS)
 else
 SHARED_LIBRARY_LIBS += \
     ctypes/libffi/.libs/libffi.$(LIB_SUFFIX) \
     $(NULL)
--- a/js/src/gdb/Makefile.in
+++ b/js/src/gdb/Makefile.in
@@ -1,18 +1,16 @@
 # -*- Mode: makefile -*-
 #
 # 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/.
 
 LIBS = ../$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLIB_LIBS)
 
-LOCAL_INCLUDES += -I$(srcdir)/.. -I..
-
 ifdef MOZ_SHARED_ICU
 EXTRA_LIBS += $(MOZ_ICU_LIBS)
 endif
 
 EXTRA_LIBS += $(MOZ_FFI_LIBS)
 
 # Place a GDB Python auto-load file next to the gdb-tests executable, both
 # in the build directory and in the dist/bin directory.
--- a/js/src/gdb/moz.build
+++ b/js/src/gdb/moz.build
@@ -16,8 +16,11 @@ UNIFIED_SOURCES += [
     'tests/test-Root.cpp',
     'tests/typedef-printers.cpp',
 ]
 
 # Building against js_static requires that we declare mfbt sybols "exported"
 # on its behalf.
 for var in ('EXPORT_JS_API', 'IMPL_MFBT'):
     DEFINES[var] = True
+
+LOCAL_INCLUDES += ['..']
+GENERATED_INCLUDES += ['..']
--- a/js/src/jsapi-tests/Makefile.in
+++ b/js/src/jsapi-tests/Makefile.in
@@ -1,18 +1,16 @@
 # -*- Mode: makefile -*-
 #
 # 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/.
 
 LIBS      = ../$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLIB_LIBS)
 
-LOCAL_INCLUDES += -I$(srcdir)/.. -I..
-
 ifdef MOZ_SHARED_ICU
 EXTRA_LIBS += $(MOZ_ICU_LIBS)
 endif
 
 EXTRA_LIBS += $(MOZ_FFI_LIBS)
 
 ifdef QEMU_EXE
 MOZ_POST_PROGRAM_COMMAND = $(topsrcdir)/build/qemu-wrap --qemu $(QEMU_EXE) --libdir $(CROSS_LIB)
--- a/js/src/jsapi-tests/moz.build
+++ b/js/src/jsapi-tests/moz.build
@@ -76,8 +76,11 @@ if CONFIG['ENABLE_ION']:
     UNIFIED_SOURCES += [
         'testJitRValueAlloc.cpp',
     ]
 
 DEFINES['EXPORT_JS_API'] = True
 # Building against js_static requires that we declare mfbt sybols "exported"
 # on its behalf.
 DEFINES['IMPL_MFBT'] = True
+
+LOCAL_INCLUDES += ['..']
+GENERATED_INCLUDES += ['..']
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -365,16 +365,20 @@ if CONFIG['ENABLE_YARR_JIT']:
         'yarr/YarrJIT.cpp'
     ]
 
 if CONFIG['JS_HAS_CTYPES']:
     SOURCES += [
         'ctypes/CTypes.cpp',
         'ctypes/Library.cpp',
     ]
+    if not CONFIG['MOZ_NATIVE_FFI']:
+        GENERATED_INCLUDES += [
+            'ctypes/libffi/include',
+        ]
 
 if CONFIG['MOZ_VTUNE']:
     SOURCES += [
         'vtune/jitprofiling.c'
     ]
 
 if CONFIG['HAVE_LINUX_PERF_EVENT_H']:
     SOURCES += [
--- a/js/src/shell/Makefile.in
+++ b/js/src/shell/Makefile.in
@@ -7,18 +7,16 @@
 LIBS      = $(NSPR_LIBS) $(EDITLINE_LIBS) ../$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(MOZ_ZLIB_LIBS)
 ifdef MOZ_NATIVE_FFI
 EXTRA_LIBS += $(MOZ_FFI_LIBS)
 endif
 ifdef MOZ_SHARED_ICU
 EXTRA_LIBS += $(MOZ_ICU_LIBS)
 endif
 
-LOCAL_INCLUDES += -I$(srcdir)/.. -I..
-
 ifeq ($(OS_ARCH),Darwin)
 ifeq ($(TARGET_CPU),x86_64)
 DARWIN_EXE_LDFLAGS += -pagezero_size 10000 -image_base 100000000
 endif
 endif
 
 ifdef QEMU_EXE
 MOZ_POST_PROGRAM_COMMAND = $(topsrcdir)/build/qemu-wrap --qemu $(QEMU_EXE) --libdir $(CROSS_LIB)
--- a/js/src/shell/moz.build
+++ b/js/src/shell/moz.build
@@ -18,8 +18,11 @@ UNIFIED_SOURCES += [
 for var in ('EXPORT_JS_API', 'IMPL_MFBT'):
     DEFINES[var] = True
 
 if CONFIG['_MSC_VER']:
     # unnecessary PGO for js shell.  But gcc cannot turn off pgo because it is
     # necessary to link PGO lib on gcc when a object/static lib are compiled
     # for PGO.
     NO_PGO = True
+
+LOCAL_INCLUDES += ['..']
+GENERATED_INCLUDES += ['..']