summary refs log tree commit diff
path: root/debug/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'debug/Makefile')
-rw-r--r--debug/Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/debug/Makefile b/debug/Makefile
index d13be3d684..0f465ffecf 100644
--- a/debug/Makefile
+++ b/debug/Makefile
@@ -39,12 +39,14 @@ libSegFault-inhibit-o = $(filter-out .os,$(object-suffixes))
 libpcprofile-routines = pcprofile
 libpcprofile-inhibit-o = $(filter-out .os,$(object-suffixes))
 
+install-bin = pcprofiledump xtrace
+
 include ../Makeconfig
 
 distribute += catchsegv.sh
 ifeq ($(elf),yes)
 ifeq ($(build-shared),yes)
-install-bin = catchsegv
+install-bin += catchsegv
 endif
 endif
 generated = catchsegv
@@ -57,6 +59,15 @@ $(objpfx)catchsegv: catchsegv.sh $(common-objpfx)soversions.mk \
 	chmod 555 $@.new
 	mv -f $@.new $@
 
+$(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o
+	$(LINK.o) -o $@ $^
+
+$(objpfx)xtrace: xtrace.sh
+	rm -f $@.new
+	sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \
+	    -e 's|@LIBDIR@|$(libdir)|' -e 's|@BINDIR@|$(bindir)|' $^ > $@.new \
+	&& rm -f $@ && mv $@.new $@ && chmod +x $@
+
 # Depend on libc.so so a DT_NEEDED is generated in the shared objects.
 # This ensures they will load libc.so for needed symbols if loaded by
 # a statically-linked program that hasn't already loaded it.