summaryrefslogtreecommitdiffstats
path: root/Makefile.pre.in
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in61
1 files changed, 28 insertions, 33 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 9211032..4133e7e 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -109,6 +109,7 @@ MACHDEP= @MACHDEP@
# Multiarch directory (may be empty)
MULTIARCH= @MULTIARCH@
+MULTIARCH_CPPFLAGS = @MULTIARCH_CPPFLAGS@
# Install prefix for architecture-independent files
prefix= @prefix@
@@ -280,18 +281,6 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
# Parser
PGEN= Parser/pgen$(EXE)
-PSRCS= \
- Parser/acceler.c \
- Parser/grammar1.c \
- Parser/listnode.c \
- Parser/node.c \
- Parser/parser.c \
- Parser/bitset.c \
- Parser/metagrammar.c \
- Parser/firstsets.c \
- Parser/grammar.c \
- Parser/pgen.c
-
POBJS= \
Parser/acceler.o \
Parser/grammar1.o \
@@ -306,16 +295,6 @@ POBJS= \
PARSER_OBJS= $(POBJS) Parser/myreadline.o Parser/parsetok.o Parser/tokenizer.o
-PGSRCS= \
- Objects/obmalloc.c \
- Python/dynamic_annotations.c \
- Python/mysnprintf.c \
- Python/pyctype.c \
- Parser/tokenizer_pgen.c \
- Parser/printgrammar.c \
- Parser/parsetok_pgen.c \
- Parser/pgenmain.c
-
PGOBJS= \
Objects/obmalloc.o \
Python/dynamic_annotations.o \
@@ -331,7 +310,6 @@ PARSER_HEADERS= \
$(srcdir)/Include/parsetok.h \
$(srcdir)/Parser/tokenizer.h
-PGENSRCS= $(PSRCS) $(PGSRCS)
PGENOBJS= $(POBJS) $(PGOBJS)
##########################################################################
@@ -571,7 +549,7 @@ $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
$(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
platform: $(BUILDPYTHON) pybuilddir.txt
- $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
+ $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
# Create build directory and generate the sysconfig build-time data there.
# pybuilddir.txt contains the name of the build dir and is used for
@@ -780,6 +758,7 @@ Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile
Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile
$(CC) -c $(PY_CORE_CFLAGS) \
-DABIFLAGS='"$(ABIFLAGS)"' \
+ $(MULTIARCH_CPPFLAGS) \
-o $@ $(srcdir)/Python/sysmodule.c
$(IO_OBJS): $(IO_H)
@@ -928,6 +907,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/objimpl.h \
$(OPCODE_H) \
$(srcdir)/Include/osdefs.h \
+ $(srcdir)/Include/osmodule.h \
$(srcdir)/Include/patchlevel.h \
$(srcdir)/Include/pgen.h \
$(srcdir)/Include/pgenheaders.h \
@@ -977,7 +957,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)
TESTOPTS= $(EXTRATESTOPTS)
TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS)
TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
-TESTTIMEOUT= 3600
+TESTTIMEOUT= 900
# Run a basic set of regression tests.
# This excludes some tests that are particularly resource-intensive.
@@ -1015,7 +995,7 @@ buildbottest: all platform
-@if which pybuildbot.identify >/dev/null 2>&1; then \
pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
fi
- $(TESTRUNNER) -j 1 -u all -W --timeout=$(TESTTIMEOUT) $(TESTOPTS)
+ $(TESTRUNNER) -j 1 -u all -W --slowest --timeout=$(TESTTIMEOUT) $(TESTOPTS)
QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
test_multibytecodec test_urllib2_localnet test_itertools \
@@ -1178,6 +1158,7 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
test/cjkencodings test/decimaltestdata test/xmltestdata \
test/eintrdata \
test/imghdrdata \
+ test/libregrtest \
test/subprocessdata test/sndhdrdata test/support \
test/tracedmodules test/encoded_modules \
test/test_import \
@@ -1247,7 +1228,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
else true; \
fi; \
done
- @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py; \
+ @for i in $(srcdir)/Lib/*.py; \
do \
if test -x $$i; then \
$(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
@@ -1282,6 +1263,10 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
esac; \
done; \
done
+ $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS).py \
+ $(DESTDIR)$(LIBDEST)/$(PLATDIR); \
+ echo $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS).py \
+ $(LIBDEST)/$(PLATDIR)
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
@@ -1320,13 +1305,19 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
# Create the PLATDIR source directory, if one wasn't distributed..
+# For multiarch targets, use the plat-linux/regen script.
$(srcdir)/Lib/$(PLATDIR):
mkdir $(srcdir)/Lib/$(PLATDIR)
- cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
+ if [ -n "$(MULTIARCH)" ]; then \
+ cp $(srcdir)/Lib/plat-linux/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
+ else \
+ cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
+ fi; \
export PATH; PATH="`pwd`:$$PATH"; \
export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
export EXE; EXE="$(BUILDEXE)"; \
+ export CC; CC="$(CC)"; \
if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
export PYTHON_FOR_BUILD; \
if [ "$(BUILD_GNU_TYPE)" = "$(HOST_GNU_TYPE)" ]; then \
@@ -1334,6 +1325,7 @@ $(srcdir)/Lib/$(PLATDIR):
else \
PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \
fi; \
+ export H2PY; H2PY="$$PYTHON_FOR_BUILD $(abs_srcdir)/Tools/scripts/h2py.py"; \
cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
@@ -1432,7 +1424,7 @@ sharedinstall: sharedmods
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
--root=$(DESTDIR)/
- -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py
+ -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS).py
-rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
# Here are a couple of targets for MacOSX again, to install a full
@@ -1478,10 +1470,10 @@ frameworkinstallstructure: $(LDLIBRARY)
# Install a number of symlinks to keep software that expects a normal unix
# install (which includes python-config) happy.
frameworkinstallmaclib:
- $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/python$(VERSION)/config-$(LDVERSION)/libpython$(LDVERSION).a"
- $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/python$(VERSION)/config-$(LDVERSION)/libpython$(LDVERSION).dylib"
- $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/python$(VERSION)/config-$(LDVERSION)/libpython$(VERSION).a"
- $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/python$(VERSION)/config-$(LDVERSION)/libpython$(VERSION).dylib"
+ $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).a"
+ $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(LDVERSION).dylib"
+ $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).a"
+ $(LN) -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(LIBPL)/libpython$(VERSION).dylib"
$(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(LDVERSION).dylib"
$(LN) -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(VERSION).dylib"
@@ -1611,6 +1603,9 @@ clobber: clean profile-removal
-rm -rf build platform
-rm -rf $(PYTHONFRAMEWORKDIR)
-rm -f python-config.py python-config
+ if [ -n "$(MULTIARCH)" ]; then \
+ rm -rf $(srcdir)/Lib/$(PLATDIR); \
+ fi
# Make things extra clean, before making a distribution:
# remove all generated files, even Makefile[.pre]