summaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2001-01-18 21:20:56 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2001-01-18 21:20:56 (GMT)
commit95695e2fa3d32661c177a724a543c17e9b0baa46 (patch)
treee139a232f318675aa839eeb1e53be73866add3db /Makefile.in
parent5bbc7b9283c40996c198511f57211d4f77d6a12d (diff)
downloadcpython-95695e2fa3d32661c177a724a543c17e9b0baa46.zip
cpython-95695e2fa3d32661c177a724a543c17e9b0baa46.tar.gz
cpython-95695e2fa3d32661c177a724a543c17e9b0baa46.tar.bz2
Patch #103313: Fixes "make test" by adding a little file named
"platform", running the Python binary to create it, and then using it to set PYTHONPATH.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in
index 48d3f0c..eee92b4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -155,6 +155,9 @@ Modules/python.o: $(srcdir)/Modules/python.c
buildno:
echo 0 >buildno
+platform: python$(EXE)
+ ./python$(EXE) -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
+
# Build the shared modules
sharedmods: python$(EXE)
./python$(EXE) $(srcdir)/setup.py build
@@ -215,10 +218,10 @@ Modules: Parser Python Objects
TESTOPTS= -l
TESTPROG= $(srcdir)/Lib/test/regrtest.py
TESTPYTHON= ./python$(EXE) -tt
-test: all
+test: all platform
-rm -f $(srcdir)/Lib/test/*.py[co]
- -PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
- PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
+ -PYTHONPATH=$(srcdir)/build/lib.`cat platform` $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
+ PYTHONPATH=$(srcdir)/build/lib.`cat platform` $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
# Install everything
install: altinstall bininstall maninstall
@@ -541,7 +544,7 @@ distclean: clobber
-$(MAKE) -f $(srcdir)/Makefile.in \
SUBDIRS="$(SUBDIRSTOO)" clobber
-rm -f config.status config.log config.cache config.h Makefile
- -rm -f buildno
+ -rm -f buildno platform
-rm -f Modules/Makefile
-for i in $(SUBDIRS) $(SUBDIRSTOO); do \
for f in $$i/*.in; do \