Bug 1252931 - Remove INSTALL/PP_TARGETS from js/src/*; r=gps draft
authorMike Shal <mshal@mozilla.com>
Fri, 18 Mar 2016 19:32:45 -0400
changeset 344491 211496cb33302d4fee836e1dafc05896a71004ad
parent 344490 3b29f27623ce6819c009d4624323b14bde5953cd
child 516969 6d6e28e78f543a55e46ee2f85b555f823e9fb3e4
push id13839
push userbmo:mshal@mozilla.com
push dateThu, 24 Mar 2016 18:36:17 +0000
reviewersgps
bugs1252931
milestone48.0a1
Bug 1252931 - Remove INSTALL/PP_TARGETS from js/src/*; r=gps MozReview-Commit-ID: Lb0V5x1aP7z
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
@@ -36,26 +36,16 @@ OS_LDFLAGS += -Wl,-version-script,symver
 
 symverscript: symverscript.in
 	$(call py_action,preprocessor, \
 		-DVERSION='$(subst -,_,$(LIBRARY_NAME))' $< -o $@)
 
 EXTRA_DEPS += symverscript
 endif
 
-export_files = js-config.h
-ifdef HAVE_DTRACE
-export_files += $(CURDIR)/javascript-trace.h
-endif
-
-INSTALL_TARGETS += jsconfig
-jsconfig_FILES = $(export_files)
-jsconfig_DEST = $(DIST)/include
-jsconfig_TARGET := export
-
 include $(topsrcdir)/config/rules.mk
 
 # check_vanilla_allocations.py is tailored to Linux, so only run it there.
 # That should be enough to catch any problems.
 check-vanilla-allocations:
 	$(PYTHON) $(topsrcdir)/config/check_vanilla_allocations.py $(REAL_LIBRARY)
 
 # The "aggressive" variant will likely fail on some compiler/platform
@@ -248,17 +238,17 @@ ETWProvider.res: ETWProvider.rc
 export:: ETWProvider.res
 
 install:: ETWProvider.mof ETWProvider.man
 	$(SYSINSTALL) $^ $(DESTDIR)$(bindir)
 
 endif
 
 ifdef HAVE_DTRACE
-$(CURDIR)/javascript-trace.h: $(srcdir)/devtools/javascript-trace.d
+javascript-trace.h: $(srcdir)/devtools/javascript-trace.d
 	dtrace -x nolibs -h -s $(srcdir)/devtools/javascript-trace.d -o javascript-trace.h.in
 	sed -e 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \
 	    -e '/const/!s/char \*/const char */g' \
 	    javascript-trace.h.in > javascript-trace.h
 
 # We can't automatically generate dependencies on auto-generated headers;
 # we have to list them explicitly.
 $(addsuffix .$(OBJ_SUFFIX),Probes jsinterp jsobj): $(CURDIR)/javascript-trace.h
deleted file mode 100644
--- a/js/src/gdb/Makefile.in
+++ /dev/null
@@ -1,15 +0,0 @@
-# -*- 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/.
-
-# Place a GDB Python auto-load file next to the gdb-tests executable, both
-# in the build directory and in the dist/bin directory.
-PP_TARGETS += GDB_AUTOLOAD
-GDB_AUTOLOAD := gdb-tests-gdb.py.in
-GDB_AUTOLOAD_FLAGS := -Dtopsrcdir=$(abspath $(srcdir)/..)
-
-INSTALL_TARGETS += GDB_INSTALL_AUTOLOAD
-GDB_INSTALL_AUTOLOAD_FILES := $(CURDIR)/gdb-tests-gdb.py
-GDB_INSTALL_AUTOLOAD_DEST := $(DIST)/bin
--- a/js/src/gdb/moz.build
+++ b/js/src/gdb/moz.build
@@ -29,8 +29,12 @@ LOCAL_INCLUDES += [
     '..',
 ]
 
 USE_LIBS += [
     'static:js',
 ]
 
 OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
+
+DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR
+FINAL_TARGET_PP_FILES += ['gdb-tests-gdb.py.in']
+OBJDIR_FILES.js.src.gdb += ['!/dist/bin/gdb-tests-gdb.py']
--- a/js/src/jsapi-tests/Makefile.in
+++ b/js/src/jsapi-tests/Makefile.in
@@ -2,14 +2,8 @@
 #
 # 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 QEMU_EXE
 MOZ_POST_PROGRAM_COMMAND = $(topsrcdir)/build/qemu-wrap --qemu $(QEMU_EXE) --libdir $(CROSS_LIB)
 endif
-
-# Place a GDB Python auto-load file next to the jsapi-tests executable in
-# the build directory.
-PP_TARGETS += JSAPI_TESTS_AUTOLOAD
-JSAPI_TESTS_AUTOLOAD := jsapi-tests-gdb.py.in
-JSAPI_TESTS_AUTOLOAD_FLAGS := -Dtopsrcdir=$(abspath $(srcdir)/..)
--- a/js/src/jsapi-tests/moz.build
+++ b/js/src/jsapi-tests/moz.build
@@ -124,8 +124,11 @@ LOCAL_INCLUDES += [
     '..',
 ]
 
 USE_LIBS += [
     'static:js',
 ]
 
 OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
+
+DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR
+OBJDIR_PP_FILES.js.src['jsapi-tests'] += ['jsapi-tests-gdb.py.in']
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -72,20 +72,26 @@ if not CONFIG['JS_STANDALONE']:
         '../../config/autoconf-js.mk',
         '../../config/emptyvars-js.mk',
     ]
 
 CONFIGURE_DEFINE_FILES += [
     'js-config.h',
 ]
 
+if CONFIG['HAVE_DTRACE']:
+    GENERATED_FILES += ['javascript-trace.h']
+
+    EXPORTS += ['!javascript-trace.h']
+
 # Changes to internal header files, used externally, massively slow down
 # browser builds.  Don't add new files here unless you know what you're
 # doing!
 EXPORTS += [
+    '!js-config.h',
     'js.msg',
     'jsalloc.h',
     'jsapi.h',
     'jsbytecode.h',
     'jsclist.h',
     'jscpucfg.h',
     'jsfriendapi.h',
     'jsprf.h',
--- a/js/src/shell/Makefile.in
+++ b/js/src/shell/Makefile.in
@@ -3,26 +3,16 @@
 # 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 QEMU_EXE
 MOZ_POST_PROGRAM_COMMAND = $(topsrcdir)/build/qemu-wrap --qemu $(QEMU_EXE) --libdir $(CROSS_LIB)
 endif
 
-# Place a GDB Python auto-load file next to the shell executable, both in
-# the build directory and in the dist/bin directory.
-PP_TARGETS += SHELL_AUTOLOAD
-SHELL_AUTOLOAD := js-gdb.py.in
-SHELL_AUTOLOAD_FLAGS := -Dtopsrcdir=$(abspath $(srcdir)/..)
-
-INSTALL_TARGETS += SHELL_INSTALL_AUTOLOAD
-SHELL_INSTALL_AUTOLOAD_FILES := $(CURDIR)/js-gdb.py
-SHELL_INSTALL_AUTOLOAD_DEST := $(DIST)/bin
-
 include $(topsrcdir)/config/rules.mk
 
 # People expect the js shell to wind up in the top-level JS dir.
 libs::
 	$(INSTALL) $(IFLAGS2) $(PROGRAM) ..
 
 GARBAGE += ../$(PROGRAM)
 
--- a/js/src/shell/moz.build
+++ b/js/src/shell/moz.build
@@ -39,8 +39,14 @@ OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 # Prepare module loader JS code for embedding
 GENERATED_FILES += ['shellmoduleloader.out.h']
 shellmoduleloader = GENERATED_FILES['shellmoduleloader.out.h']
 shellmoduleloader.script = '../builtin/embedjs.py:generate_shellmoduleloader'
 shellmoduleloader.inputs = [
     '../js.msg',
     'ModuleLoader.js',
 ]
+
+# 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']
+OBJDIR_FILES.js.src.shell += ['!/dist/bin/js-gdb.py']