summaryrefslogtreecommitdiff
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authordoko <doko@python.org>2013-01-26 11:39:31 +0100
committerdoko <doko@python.org>2013-01-26 11:39:31 +0100
commitf8121c9b9960cf01e5eb36db91945f6839d74e35 (patch)
tree14362928e14afdc95f680f0f69a5dcdf1813bb69 /Makefile.pre.in
parent577d5284333e6bb1981f23a794a8d8980374bc04 (diff)
downloadcpython-f8121c9b9960cf01e5eb36db91945f6839d74e35.tar.gz
- 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 a9a68e3ef1..f8d5674075 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]