From dff5c306a08b09cb59f5c5acc80fee8bd4e43166 Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Tue, 15 Apr 2014 23:50:06 +0530 Subject: Closes Issue 17861: Autogenerate Include/opcode.h from opcode.py. It includes required changes in Makefile.pre.in and configure.ac among other files. --- Makefile.pre.in | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 5af61e3d9c..fbec3b7a68 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -322,6 +322,13 @@ PARSER_HEADERS= \ PGENSRCS= $(PSRCS) $(PGSRCS) PGENOBJS= $(POBJS) $(PGOBJS) +########################################################################## +# opcode.h generation +OPCODE_H_DIR= Include +OPCODE_H_SCRIPT= Tools/scripts/generate_opcode_h.py +OPCODE_H= $(srcdir)/$(OPCODE_H_DIR)/opcode.h +OPCODE_H_GEN= @OPCODEHGEN@ $(OPCODE_H_SCRIPT) Lib/ $(OPCODE_H) +# ########################################################################## # AST AST_H_DIR= Include @@ -760,6 +767,9 @@ $(AST_C): $(AST_H) $(AST_ASDL) $(ASDLGEN_FILES) $(MKDIR_P) $(AST_C_DIR) $(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL) +$(OPCODE_H): $(srcdir)/Lib/opcode.py $(OPCODE_H_SCRIPT) + $(OPCODE_H_GEN) + Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) Python/getplatform.o: $(srcdir)/Python/getplatform.c @@ -871,7 +881,7 @@ PYTHON_HEADERS= \ $(srcdir)/Include/node.h \ $(srcdir)/Include/object.h \ $(srcdir)/Include/objimpl.h \ - $(srcdir)/Include/opcode.h \ + $(OPCODE_H) \ $(srcdir)/Include/osdefs.h \ $(srcdir)/Include/patchlevel.h \ $(srcdir)/Include/pgen.h \ -- cgit v1.2.1 From b7781c267239a03e8060544d1eb90c3f3fb4b23e Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Thu, 17 Apr 2014 01:13:29 +0200 Subject: Fix Tools/scripts/generate_opcode_h.py from issue #17861 to work correctly when building in a separate object tree. More people should build this way. This may still fail if the source is unwritable, I haven't tested that yet. --- Makefile.pre.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index fbec3b7a68..8866766305 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -324,10 +324,10 @@ PGENOBJS= $(POBJS) $(PGOBJS) ########################################################################## # opcode.h generation -OPCODE_H_DIR= Include -OPCODE_H_SCRIPT= Tools/scripts/generate_opcode_h.py -OPCODE_H= $(srcdir)/$(OPCODE_H_DIR)/opcode.h -OPCODE_H_GEN= @OPCODEHGEN@ $(OPCODE_H_SCRIPT) Lib/ $(OPCODE_H) +OPCODE_H_DIR= $(srcdir)/Include +OPCODE_H_SCRIPT= $(srcdir)/Tools/scripts/generate_opcode_h.py +OPCODE_H= $(OPCODE_H_DIR)/opcode.h +OPCODE_H_GEN= @OPCODEHGEN@ $(OPCODE_H_SCRIPT) $(srcdir)/Lib/opcode.py $(OPCODE_H) # ########################################################################## # AST -- cgit v1.2.1 From 411d273e5dd17e0f6c0f4336316e4b8c01a6ed4a Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Fri, 25 Jul 2014 21:52:14 +1000 Subject: Issue #18093: Factor out the programs that embed the runtime --- Makefile.pre.in | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 43bc818022..03875ef948 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -466,7 +466,7 @@ LIBRARY_OBJS= \ # Default target all: build_all -build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testembed python-config +build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Programs/_testembed python-config # Compile a binary with gcc profile guided optimization. profile-opt: @@ -539,8 +539,8 @@ clinic: $(BUILDPYTHON) $(RUNSHARED) $(PYTHON_FOR_BUILD) ./Tools/clinic/clinic.py --make # Build the interpreter -$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) - $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) +$(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 @@ -665,18 +665,18 @@ Modules/Setup: $(srcdir)/Modules/Setup.dist echo "-----------------------------------------------"; \ fi -Modules/_testembed: Modules/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) - $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) +Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) + $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) ############################################################################ # Importlib -Modules/_freeze_importlib: Modules/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) - $(LINKCC) $(PY_LDFLAGS) -o $@ Modules/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) +Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) + $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Modules/_freeze_importlib.c - $(MAKE) Modules/_freeze_importlib - ./Modules/_freeze_importlib \ +Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib.c + $(MAKE) Programs/_freeze_importlib + ./Programs/_freeze_importlib \ $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h @@ -704,11 +704,11 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile -DVPATH='"$(VPATH)"' \ -o $@ $(srcdir)/Modules/getpath.c -Modules/python.o: $(srcdir)/Modules/python.c - $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Modules/python.c +Programs/python.o: $(srcdir)/Programs/python.c + $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c -Modules/_testembed.o: $(srcdir)/Modules/_testembed.c - $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Modules/_testembed.c +Programs/_testembed.o: $(srcdir)/Programs/_testembed.c + $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c Modules/_sre.o: $(srcdir)/Modules/_sre.c $(srcdir)/Modules/sre.h $(srcdir)/Modules/sre_constants.h $(srcdir)/Modules/sre_lib.h @@ -922,7 +922,7 @@ PYTHON_HEADERS= \ $(PARSER_HEADERS) \ $(AST_H) -$(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS) +$(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS) ###################################################################### @@ -1332,7 +1332,7 @@ libainstall: all python-config fi; \ fi $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c - $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o + $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup @@ -1343,10 +1343,10 @@ libainstall: all python-config $(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 - @if [ -s Modules/python.exp -a \ + @if [ -s Programs/python.exp -a \ "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \ echo; echo "Installing support files for building shared extension modules on AIX:"; \ - $(INSTALL_DATA) Modules/python.exp \ + $(INSTALL_DATA) Programs/python.exp \ $(DESTDIR)$(LIBPL)/python.exp; \ echo; echo "$(LIBPL)/python.exp"; \ $(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \ @@ -1526,7 +1526,7 @@ clean: pycremoval find build -name '*.py[co]' -exec rm -f {} ';' || true -rm -f pybuilddir.txt -rm -f Lib/lib2to3/*Grammar*.pickle - -rm -f Modules/_testembed Modules/_freeze_importlib + -rm -f Programs/_testembed Programs/_freeze_importlib profile-removal: find . -name '*.gc??' -exec rm -f {} ';' @@ -1550,7 +1550,7 @@ distclean: clobber done -rm -f core Makefile Makefile.pre config.status \ Modules/Setup Modules/Setup.local Modules/Setup.config \ - Modules/ld_so_aix Modules/python.exp Misc/python.pc + Modules/ld_so_aix Programs/python.exp Misc/python.pc -rm -f python*-gdb.py find $(srcdir)/[a-zA-Z]* '(' -name '*.fdc' -o -name '*~' \ -o -name '[@,#]*' -o -name '*.old' \ -- cgit v1.2.1 From df060439314defd432403a44c858c3496d3ee354 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 21 Sep 2014 00:21:58 +0200 Subject: Issue #22359: Remove incorrect uses of recursive make. Patch by Jonas Wagner. --- Makefile.pre.in | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 04e4704a7d..e5f5644a50 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -686,11 +686,12 @@ Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) ############################################################################ # Importlib +Programs/_freeze_importlib.o: Programs/_freeze_importlib.c + Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib.c - $(MAKE) Programs/_freeze_importlib +Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib ./Programs/_freeze_importlib \ $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h @@ -752,15 +753,13 @@ Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(IO_OBJS): $(IO_H) -$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) +$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN) @$(MKDIR_P) Include - $(MAKE) $(PGEN) $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -$(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS) - $(MAKE) $(GRAMMAR_H) +$(GRAMMAR_C): $(GRAMMAR_H) touch $(GRAMMAR_C) -$(PGEN): $(PGENOBJS) +$(PGEN): $(PGENOBJS) $(CC) $(OPT) $(PY_LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) Parser/grammar.o: $(srcdir)/Parser/grammar.c \ -- cgit v1.2.1 From 86a58dabec40bfb4c112b918cabd7eb21e52183c Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Thu, 20 Nov 2014 21:39:37 +1000 Subject: Issue #22869: Split pythonrun into two modules - interpreter startup and shutdown code moved to a new pylifecycle.c module - Py_OptimizeFlag moved into the new module with the other global flags --- Makefile.pre.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 894b08e607..89d7e72e90 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -389,6 +389,7 @@ PYTHON_OBJS= \ Python/pyctype.o \ Python/pyfpe.o \ Python/pyhash.o \ + Python/pylifecycle.o \ Python/pymath.o \ Python/pystate.o \ Python/pythonrun.o \ @@ -909,6 +910,7 @@ PYTHON_HEADERS= \ $(srcdir)/Include/pyerrors.h \ $(srcdir)/Include/pyfpe.h \ $(srcdir)/Include/pyhash.h \ + $(srcdir)/Include/pylifecycle.h \ $(srcdir)/Include/pymath.h \ $(srcdir)/Include/pygetopt.h \ $(srcdir)/Include/pymacro.h \ -- cgit v1.2.1 From a652fc473fe21edd5f65241aa27bb2786e116f7f Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sat, 13 Dec 2014 02:05:15 -0800 Subject: Issue #17636: Install new test directories. --- Makefile.pre.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 89d7e72e90..9870b2df01 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1146,6 +1146,10 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ test/imghdrdata \ test/subprocessdata test/sndhdrdata test/support \ test/tracedmodules test/encoded_modules \ + test/test_import \ + test/test_import/data \ + test/test_import/data/circular_imports \ + test/test_import/data/circular_imports/subpkg \ test/test_importlib/namespace_pkgs \ test/test_importlib/namespace_pkgs/both_portions \ test/test_importlib/namespace_pkgs/both_portions/foo \ -- cgit v1.2.1 From 81d6af8202723ee501e5b5ebf19362815c5e1380 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sun, 8 Feb 2015 15:48:40 +1100 Subject: Issue #23285: Install new test directory. --- Makefile.pre.in | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 55032d0ba0..d9ee777085 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1143,6 +1143,7 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ test/audiodata \ test/capath test/data \ test/cjkencodings test/decimaltestdata test/xmltestdata \ + test/eintrdata \ test/imghdrdata \ test/subprocessdata test/sndhdrdata test/support \ test/tracedmodules test/encoded_modules \ -- cgit v1.2.1 From 1fc906ec3bf8b1f03f12b43730e3ca75325fdca2 Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Mon, 16 Mar 2015 15:30:31 +1300 Subject: Issue #23585: make patchcheck will ensure the interpreter is built. --- Makefile.pre.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index d9ee777085..f2eb92a66c 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1622,7 +1622,7 @@ funny: -o -print # Perform some verification checks on any modified files. -patchcheck: +patchcheck: all $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py # Dependencies -- cgit v1.2.1 From 0a831ffa64debc669174eed7b4a1c91a7cbbdc9d Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Mon, 13 Apr 2015 11:30:49 -0400 Subject: Rebuild _freeze_importlib.o when Makefile changes --- Makefile.pre.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index f2eb92a66c..2e04b275c4 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -688,7 +688,7 @@ Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) ############################################################################ # Importlib -Programs/_freeze_importlib.o: Programs/_freeze_importlib.c +Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -- cgit v1.2.1 From b09b34b211300f68cc98f6b882f7d2e2f4a76f10 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 13 Apr 2015 14:21:02 -0400 Subject: Issue #23731: Implement PEP 488. The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied. --- Makefile.pre.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 2e04b275c4..d95653bf6d 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1263,7 +1263,12 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c -d $(LIBDEST) -f \ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ $(DESTDIR)$(LIBDEST) - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST)/site-packages -f \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages @@ -1271,6 +1276,10 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST)/site-packages -f \ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- cgit v1.2.1 From f36b001ad012f16a6bcc9405207c5f0abc9dfbad Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sat, 25 Apr 2015 23:22:26 +0000 Subject: Implements issue #9951: Adds a hex() method to bytes, bytearray, & memoryview. Also updates a few internal implementations of the same thing to use the new built-in code. Contributed by Arnon Yaari. --- Makefile.pre.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index b78bcf189b..34b413f707 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -402,6 +402,7 @@ PYTHON_OBJS= \ Python/getopt.o \ Python/pystrcmp.o \ Python/pystrtod.o \ + Python/pystrhex.o \ Python/dtoa.o \ Python/formatter_unicode.o \ Python/fileutils.o \ @@ -919,6 +920,7 @@ PYTHON_HEADERS= \ $(srcdir)/Include/pystate.h \ $(srcdir)/Include/pystrcmp.h \ $(srcdir)/Include/pystrtod.h \ + $(srcdir)/Include/pystrhex.h \ $(srcdir)/Include/pythonrun.h \ $(srcdir)/Include/pythread.h \ $(srcdir)/Include/pytime.h \ -- cgit v1.2.1 From 470268ae1d0e919df838db5b652ab9a8608fc2b8 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Sat, 2 May 2015 19:15:18 -0600 Subject: Issue #23911: Move path-based bootstrap code to a separate frozen module. --- Makefile.pre.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 6a068b5b5a..5db048ab35 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -533,6 +533,7 @@ coverage-report: : # force rebuilding of parser and importlib @touch $(GRAMMAR_INPUT) @touch $(srcdir)/Lib/importlib/_bootstrap.py + @touch $(srcdir)/Lib/importlib/_bootstrap_external.py : # build with coverage info $(MAKE) coverage : # run tests, ignore failures @@ -694,6 +695,10 @@ Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) +Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib + ./Programs/_freeze_importlib \ + $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h + Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib ./Programs/_freeze_importlib \ $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h @@ -841,7 +846,7 @@ $(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES) Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h -Python/frozen.o: Python/importlib.h +Python/frozen.o: Python/importlib.h Python/importlib_external.h Objects/typeobject.o: Objects/typeslots.inc Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py -- cgit v1.2.1 From 1b80fbf61c833e94b67d313523015df6e1136550 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Fri, 29 May 2015 22:21:39 -0600 Subject: Issue #16991: Add a C implementation of collections.OrderedDict. --- Makefile.pre.in | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 5db048ab35..ce2c0aa290 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -437,6 +437,7 @@ OBJECT_OBJS= \ Objects/listobject.o \ Objects/longobject.o \ Objects/dictobject.o \ + Objects/odictobject.o \ Objects/memoryobject.o \ Objects/methodobject.o \ Objects/moduleobject.o \ -- cgit v1.2.1 From 5f6fd63f998e32bbe732fe7e9ac3d3de4841e37b Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 18 Sep 2015 15:13:44 -0700 Subject: Issue #24915: Add Clang support to PGO builds and use the test suite for profile data. Thanks to Alecsandru Patrascu of Intel for the initial patch. --- Makefile.pre.in | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index ce2c0aa290..9a8c1599b9 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -43,6 +43,11 @@ LDVERSION= @LDVERSION@ HGVERSION= @HGVERSION@ HGTAG= @HGTAG@ HGBRANCH= @HGBRANCH@ +PGO_PROF_GEN_FLAG=@PGO_PROF_GEN_FLAG@ +PGO_PROF_USE_FLAG=@PGO_PROF_USE_FLAG@ +LLVM_PROF_MERGER=@LLVM_PROF_MERGER@ +LLVM_PROF_FILE=@LLVM_PROF_FILE@ +LLVM_PROF_ERR=@LLVM_PROF_ERR@ GNULD= @GNULD@ @@ -226,8 +231,7 @@ TCLTK_INCLUDES= @TCLTK_INCLUDES@ TCLTK_LIBS= @TCLTK_LIBS@ # The task to run while instrument when building the profile-opt target -PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck -#PROFILE_TASK= $(srcdir)/Lib/test/regrtest.py +PROFILE_TASK=-m test.regrtest >/dev/null 2>&1 # report files for gcov / lcov coverage report COVERAGE_INFO= $(abs_builddir)/coverage.info @@ -477,27 +481,38 @@ LIBRARY_OBJS= \ all: build_all build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Programs/_testembed python-config -# Compile a binary with gcc profile guided optimization. +# Compile a binary with profile guided optimization. profile-opt: + @if [ $(LLVM_PROF_ERR) == yes ]; then \ + echo "Error: Cannot perform PGO build because llvm-profdata was not found in PATH" ;\ + echo "Please add it to PATH and run ./configure again" ;\ + exit 1;\ + fi @echo "Building with support for profile generation:" $(MAKE) clean + $(MAKE) profile-removal $(MAKE) build_all_generate_profile - @echo "Running benchmark to generate profile data:" $(MAKE) profile-removal + @echo "Running code to generate profile data (this can take a while):" $(MAKE) run_profile_task + $(MAKE) build_all_merge_profile @echo "Rebuilding with profile guided optimizations:" $(MAKE) clean $(MAKE) build_all_use_profile + $(MAKE) profile-removal build_all_generate_profile: - $(MAKE) all CFLAGS_NODIST="$(CFLAGS) -fprofile-generate" LDFLAGS="-fprofile-generate" LIBS="$(LIBS) -lgcov" + $(MAKE) all CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_GEN_FLAG)" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)" run_profile_task: : # FIXME: can't run for a cross build - $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) + $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true + +build_all_merge_profile: + $(LLVM_PROF_MERGER) build_all_use_profile: - $(MAKE) all CFLAGS_NODIST="$(CFLAGS) -fprofile-use -fprofile-correction" + $(MAKE) all CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_USE_FLAG)" # Compile and run with gcov .PHONY=coverage coverage-lcov coverage-report @@ -1568,9 +1583,11 @@ clean: pycremoval -rm -f pybuilddir.txt -rm -f Lib/lib2to3/*Grammar*.pickle -rm -f Programs/_testembed Programs/_freeze_importlib + -rm -rf build profile-removal: find . -name '*.gc??' -exec rm -f {} ';' + find . -name '*.profclang?' -exec rm -f {} ';' rm -f $(COVERAGE_INFO) rm -rf $(COVERAGE_REPORT) -- cgit v1.2.1 From cee64d13b90080ffe125e5adb558043c252aad4e Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 2 Oct 2015 16:16:44 -0700 Subject: Issue #25188: Add a -P/--pgo flag to regrtest to silence error output. Since PGO building doesn't care about test failures, silence them when running the test suite for performance reasons. Initial patch by Alecsandru Patrascu of Intel. --- Makefile.pre.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 9a8c1599b9..823def3cd2 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -231,7 +231,7 @@ TCLTK_INCLUDES= @TCLTK_INCLUDES@ TCLTK_LIBS= @TCLTK_LIBS@ # The task to run while instrument when building the profile-opt target -PROFILE_TASK=-m test.regrtest >/dev/null 2>&1 +PROFILE_TASK=-m test.regrtest --pgo # report files for gcov / lcov coverage report COVERAGE_INFO= $(abs_builddir)/coverage.info -- cgit v1.2.1 From 47a18b217e6fd5d7238df5d0eccfce7271f8a0c5 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 22 Nov 2015 15:18:40 +0100 Subject: Issue #25694: Install test.libregrtest to be able to run tests on the installed Python --- Makefile.pre.in | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 823def3cd2..c6c534e7d8 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1167,6 +1167,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 \ -- cgit v1.2.1 From 3ed531fd0ce9f5a27c9b9de936e7202a0ce2b866 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 13 Dec 2015 21:20:36 +0100 Subject: Issue #25696: Fix installation of Python on UNIX with make -j9. --- Makefile.pre.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 823def3cd2..e659d7526d 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1110,6 +1110,10 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@ fi bininstall: altbininstall + -if test ! -d $(DESTDIR)$(LIBPC); then \ + echo "Creating directory $(LIBPC)"; \ + $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC); \ + fi -if test -f $(DESTDIR)$(BINDIR)/python3$(EXE) -o -h $(DESTDIR)$(BINDIR)/python3$(EXE); \ then rm -f $(DESTDIR)$(BINDIR)/python3$(EXE); \ else true; \ -- cgit v1.2.1 From fcaee3645f1c73abdb2e1cf56ab631dc23ad3175 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 13 Dec 2015 21:26:17 +0100 Subject: Issue #25696: Don't ignore errors in 'make bininstall' on creating $(LIBPC) directory --- Makefile.pre.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index e659d7526d..51ab6f1af2 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1110,7 +1110,7 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@ fi bininstall: altbininstall - -if test ! -d $(DESTDIR)$(LIBPC); then \ + if test ! -d $(DESTDIR)$(LIBPC); then \ echo "Creating directory $(LIBPC)"; \ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC); \ fi -- cgit v1.2.1 From 26b842a82d9ae7d30c692080bf352a0ef78a626c Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Mon, 21 Dec 2015 12:09:17 -0600 Subject: Issue #25827: Add support for ICC to configure --- Makefile.pre.in | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 51ab6f1af2..91fa06eca7 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1592,6 +1592,7 @@ clean: pycremoval profile-removal: find . -name '*.gc??' -exec rm -f {} ';' find . -name '*.profclang?' -exec rm -f {} ';' + find . -name '*.dyn' -exec rm -f {} ';' rm -f $(COVERAGE_INFO) rm -rf $(COVERAGE_REPORT) -- cgit v1.2.1 From b834b7be5d232de43fb3002e8bee259f8f86245e Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Wed, 3 Feb 2016 05:19:44 +0000 Subject: Issue #24421: Compile _math.c separately to avoid race condition --- Makefile.pre.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 57167e61d3..2a687e58c9 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -586,11 +586,15 @@ pybuilddir.txt: $(BUILDPYTHON) exit 1 ; \ fi +# This is shared by the math and cmath modules +Modules/_math.o: Modules/_math.c Modules/_math.h + $(CC) -c $(CCSHARED) $(PY_CORE_CFLAGS) -o $@ $< + # Build the shared modules # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for # -s, --silent or --quiet is always the first char. # Under BSD make, MAKEFLAGS might be " -s -v x=y". -sharedmods: $(BUILDPYTHON) pybuilddir.txt +sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o @case "$$MAKEFLAGS" in \ *\ -s*|s*) quiet="-q";; \ *) quiet="";; \ -- cgit v1.2.1 From fca5c15d3c847c9e7bd291d8ab84481369a10598 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Wed, 3 Feb 2016 05:19:44 +0000 Subject: Issue #24421: Compile _math.c separately to avoid race condition --- Makefile.pre.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 91fa06eca7..9b4ab8def1 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -586,11 +586,15 @@ pybuilddir.txt: $(BUILDPYTHON) exit 1 ; \ fi +# This is shared by the math and cmath modules +Modules/_math.o: Modules/_math.c Modules/_math.h + $(CC) -c $(CCSHARED) $(PY_CORE_CFLAGS) -o $@ $< + # Build the shared modules # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for # -s, --silent or --quiet is always the first char. # Under BSD make, MAKEFLAGS might be " -s -v x=y". -sharedmods: $(BUILDPYTHON) pybuilddir.txt +sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o @case "$$MAKEFLAGS" in \ *\ -s*|s*) quiet="-q";; \ *) quiet="";; \ -- cgit v1.2.1 From 2b442f7d5b61dcefc5a7a18a6e7af9de5983790c Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 11 Feb 2016 13:10:36 +0200 Subject: Issue #25985: sys.version_info is now used instead of sys.version to format short Python version. --- Makefile.pre.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 2a687e58c9..6514bf8199 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -568,7 +568,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 -- cgit v1.2.1 From 3647bf1d94875094af8ed5281916aa876bfab692 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 23 Mar 2016 02:05:39 +0100 Subject: Makefile: change default value of TESTTIMEOUT from 1 hour to 15 min The whole test suite takes 6 minutes on my laptop. It takes less than 30 minutes on most buildbots. The TESTTIMEOUT is the timeout for a single test file. --- Makefile.pre.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 6514bf8199..5c90daf367 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -974,7 +974,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. -- cgit v1.2.1 From 25195e8913d29a6c9683e22649de3df5c04053bf Mon Sep 17 00:00:00 2001 From: doko Date: Wed, 23 Mar 2016 12:57:29 +0100 Subject: Makefile.pre.in (profile-opt): Fix bashism. --- Makefile.pre.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 9b4ab8def1..fc2d7095c8 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -483,7 +483,7 @@ build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Programs/_testembed # Compile a binary with profile guided optimization. profile-opt: - @if [ $(LLVM_PROF_ERR) == yes ]; then \ + @if [ $(LLVM_PROF_ERR) = yes ]; then \ echo "Error: Cannot perform PGO build because llvm-profdata was not found in PATH" ;\ echo "Please add it to PATH and run ./configure again" ;\ exit 1;\ -- cgit v1.2.1 From cd28b4e2b2a1d8b7acd9b2fe471817313797914d Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sun, 12 Jun 2016 13:21:22 -0700 Subject: Issue #27186: add Include/osmodule.h to the proper build rules --- Makefile.pre.in | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 870c0e7f69..02a0b64bb5 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -943,6 +943,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 \ -- cgit v1.2.1 From 008c426d4a560e63e9a5c56491de91c72417c68b Mon Sep 17 00:00:00 2001 From: doko Date: Tue, 14 Jun 2016 08:55:19 +0200 Subject: - Issue #23968: Rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET). Rename the config directory (LIBPL) from config-$(LDVERSION) to config-$(LDVERSION)-$(PLATFORM_TRIPLET). Install the platform specifc _sysconfigdata module into the platform directory and rename it to include the ABIFLAGS. --- Makefile.pre.in | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 02a0b64bb5..394a73535f 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@ @@ -784,6 +785,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) @@ -1263,7 +1265,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); \ @@ -1298,6 +1300,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 \ @@ -1336,13 +1342,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 \ @@ -1350,6 +1362,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 @@ -1448,7 +1461,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 @@ -1627,6 +1640,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] -- cgit v1.2.1 From f2e89f7f7debb0a229e9673ced0f70ae361b283e Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sat, 18 Jun 2016 15:58:52 -0400 Subject: Issue #23968: Fix installs of the renamed config directory for OS X framework builds. --- Makefile.pre.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Makefile.pre.in') diff --git a/Makefile.pre.in b/Makefile.pre.in index 394a73535f..2bc91d7ec4 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1507,10 +1507,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" -- cgit v1.2.1