summaryrefslogtreecommitdiffstats
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authordoko@python.org <doko@python.org>2013-01-26 10:39:31 (GMT)
committerdoko@python.org <doko@python.org>2013-01-26 10:39:31 (GMT)
commit874211978c8097b8e747c90fa3ff41aacabe340f (patch)
treecb0388e137b02eb077a423cd30cf15be236394c4 /Makefile.pre.in
parented3c4128c061aef01a19bdfa4ac8b87e43f9d768 (diff)
downloadcpython-874211978c8097b8e747c90fa3ff41aacabe340f.zip
cpython-874211978c8097b8e747c90fa3ff41aacabe340f.tar.gz
cpython-874211978c8097b8e747c90fa3ff41aacabe340f.tar.bz2
- Issue #16235: Implement python-config as a shell script.
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index a9a68e3..f8d5674 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -438,7 +438,7 @@ LIBRARY_OBJS= \
# Default target
all: build_all
-build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testembed
+build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testembed python-config
# Compile a binary with gcc profile guided optimization.
profile-opt:
@@ -1132,10 +1132,12 @@ $(srcdir)/Lib/$(PLATDIR):
fi; \
cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
-python-config: $(srcdir)/Misc/python-config.in
+python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
# Substitution happens here, as the completely-expanded BINDIR
# is not available in configure
- sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
+ sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py
+ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}
+ sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config
# Install the include files
INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
@@ -1193,8 +1195,8 @@ libainstall: all python-config
$(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
+ $(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config
- rm python-config
@if [ -s Modules/python.exp -a \
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
echo; echo "Installing support files for building shared extension modules on AIX:"; \
@@ -1381,6 +1383,7 @@ clobber: clean profile-removal
config.cache config.log pyconfig.h Modules/config.c
-rm -rf build platform
-rm -rf $(PYTHONFRAMEWORKDIR)
+ -rm -f python-config.py python-config
# Make things extra clean, before making a distribution:
# remove all generated files, even Makefile[.pre]