summaryrefslogtreecommitdiff
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2010-04-01 07:40:51 +0000
committerMartin v. Löwis <martin@v.loewis.de>2010-04-01 07:40:51 +0000
commit8c14d814242de1010bcbd02a0e0523d68aa20677 (patch)
tree4c85a8bb45010925e8f380ce260dcf00757a8e7b /Makefile.pre.in
parentb5fd8f86d3ba43cc078ff40b88ef47a6771bcbe3 (diff)
downloadcpython-8c14d814242de1010bcbd02a0e0523d68aa20677.tar.gz
Issue #8032: For gdb7, a python-gdb.py file is added to the build,
allowing to use advanced gdb features when debugging Python.
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 3a1d381f55..766398ab8d 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -360,7 +360,7 @@ LIBRARY_OBJS= \
# Default target
all: build_all
-build_all: $(BUILDPYTHON) oldsharedmods sharedmods
+build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks
# Compile a binary with gcc profile guided optimization.
profile-opt:
@@ -433,6 +433,16 @@ libpython$(VERSION).dylib: $(LIBRARY_OBJS)
libpython$(VERSION).sl: $(LIBRARY_OBJS)
$(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST)
+# Copy up the gdb python hooks into a position where they can be automatically
+# loaded by gdb during Lib/test/test_gdb.py
+#
+# Distributors are likely to want to install this somewhere else e.g. relative
+# to the stripped DWARF data for the shared library.
+gdbhooks: $(BUILDPYTHON)-gdb.py
+
+$(BUILDPYTHON)-gdb.py: Tools/gdb/libpython.py
+ $(INSTALL_SCRIPT) $< $(BUILDPYTHON)-gdb.py
+
# This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
# minimal framework (not including the Lib directory and such) in the current
# directory.
@@ -1238,5 +1248,6 @@ Python/thread.o: @THREADHEADERS@
.PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
.PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
.PHONY: smelly funny patchcheck
+.PHONY: gdbhooks
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY