Bug 1259530 - Use per-target PP_FLAGS where possible in moz.build; r?glandium
MozReview-Commit-ID: GxPe9MTd8JP
--- a/js/src/gdb/moz.build
+++ b/js/src/gdb/moz.build
@@ -40,11 +40,11 @@ if CONFIG['ENABLE_INTL_API'] and CONFIG[
USE_LIBS += ['icudata']
OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
# This is intended as a temporary workaround to enable VS2015.
if CONFIG['_MSC_VER']:
CXXFLAGS += ['-wd4312']
-DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR
FINAL_TARGET_PP_FILES += ['gdb-tests-gdb.py.in']
+PP_FLAGS['gdb-tests-gdb.py.in'] += ['-Dtopsrcdir=%s/js/src' % TOPSRCDIR]
OBJDIR_FILES.js.src.gdb += ['!/dist/bin/gdb-tests-gdb.py']
--- a/js/src/jsapi-tests/moz.build
+++ b/js/src/jsapi-tests/moz.build
@@ -134,10 +134,10 @@ USE_LIBS += [
]
OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
# This is intended as a temporary workaround to enable VS2015.
if CONFIG['_MSC_VER']:
CXXFLAGS += ['-wd4312']
-DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR
OBJDIR_PP_FILES.js.src['jsapi-tests'] += ['jsapi-tests-gdb.py.in']
+PP_FLAGS['jsapi-tests-gdb.py.in'] += ['-Dtopsrcdir=%s/js/src' % TOPSRCDIR]
--- a/js/src/shell/moz.build
+++ b/js/src/shell/moz.build
@@ -51,11 +51,11 @@ shellmoduleloader.inputs = [
]
# This is intended as a temporary workaround to enable VS2015.
if CONFIG['_MSC_VER']:
CXXFLAGS += ['-wd4312']
# Place a GDB Python auto-load file next to the shell executable, both in
# the build directory and in the dist/bin directory.
-DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR
FINAL_TARGET_PP_FILES += ['js-gdb.py.in']
+PP_FLAGS['js-gdb.py.in'] += ['-Dtopsrcdir=%s/js/src' % TOPSRCDIR]
OBJDIR_FILES.js.src.shell += ['!/dist/bin/js-gdb.py']