mirror of
https://github.com/python/cpython.git
synced 2025-09-30 20:31:52 +00:00
[3.6] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478) (#1518)
* bpo-29243: Fix Makefile with respect to --enable-optimizations (#1478) * bpo-29243: Fix Makefile with respect to --enable-optimizations When using the Profile Guided Optimization (./configure --enable-optimizations) Python is built not only during `make` but rebuilt again during `make test`, `make install` and others. This patch fixes the issue. Note that this fix produces no change at all in the Makefile if configure is run witout --enable-optimizations. * !squash (cherry picked from commita1054c3b00
) * [3.6] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478) * bpo-29243: Fix Makefile with respect to --enable-optimizations When using the Profile Guided Optimization (./configure --enable-optimizations) Python is built not only during `make` but rebuilt again during `make test`, `make install` and others. This patch fixes the issue. Note that this fix produces no change at all in the Makefile if configure is run witout --enable-optimizations. * !squash. (cherry picked from commita1054c3b00
)
This commit is contained in:
parent
72e1b61da0
commit
03b8a378df
3 changed files with 12 additions and 7 deletions
|
@ -1002,7 +1002,7 @@ TESTTIMEOUT= 1200
|
||||||
|
|
||||||
# Run a basic set of regression tests.
|
# Run a basic set of regression tests.
|
||||||
# This excludes some tests that are particularly resource-intensive.
|
# This excludes some tests that are particularly resource-intensive.
|
||||||
test: all platform
|
test: @DEF_MAKE_RULE@ platform
|
||||||
$(TESTRUNNER) $(TESTOPTS)
|
$(TESTRUNNER) $(TESTOPTS)
|
||||||
|
|
||||||
# Run the full test suite twice - once without .pyc files, and once with.
|
# Run the full test suite twice - once without .pyc files, and once with.
|
||||||
|
@ -1012,7 +1012,7 @@ test: all platform
|
||||||
# the bytecode read from a .pyc file had the bug, sometimes the directly
|
# the bytecode read from a .pyc file had the bug, sometimes the directly
|
||||||
# generated bytecode. This is sometimes a very shy bug needing a lot of
|
# generated bytecode. This is sometimes a very shy bug needing a lot of
|
||||||
# sample data.
|
# sample data.
|
||||||
testall: all platform
|
testall: @DEF_MAKE_RULE@ platform
|
||||||
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
|
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
|
||||||
$(TESTPYTHON) -E $(srcdir)/Lib/compileall.py
|
$(TESTPYTHON) -E $(srcdir)/Lib/compileall.py
|
||||||
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
|
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
|
||||||
|
@ -1021,7 +1021,7 @@ testall: all platform
|
||||||
|
|
||||||
# Run the test suite for both architectures in a Universal build on OSX.
|
# Run the test suite for both architectures in a Universal build on OSX.
|
||||||
# Must be run on an Intel box.
|
# Must be run on an Intel box.
|
||||||
testuniversal: all platform
|
testuniversal: @DEF_MAKE_RULE@ platform
|
||||||
if [ `arch` != 'i386' ];then \
|
if [ `arch` != 'i386' ];then \
|
||||||
echo "This can only be used on OSX/i386" ;\
|
echo "This can only be used on OSX/i386" ;\
|
||||||
exit 1 ;\
|
exit 1 ;\
|
||||||
|
@ -1044,7 +1044,7 @@ QUICKTESTOPTS= $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
|
||||||
test_multiprocessing_forkserver \
|
test_multiprocessing_forkserver \
|
||||||
test_mailbox test_socket test_poll \
|
test_mailbox test_socket test_poll \
|
||||||
test_select test_zipfile test_concurrent_futures
|
test_select test_zipfile test_concurrent_futures
|
||||||
quicktest: all platform
|
quicktest: @DEF_MAKE_RULE@ platform
|
||||||
$(TESTRUNNER) $(QUICKTESTOPTS)
|
$(TESTRUNNER) $(QUICKTESTOPTS)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1381,7 +1381,7 @@ LIBPL= @LIBPL@
|
||||||
# pkgconfig directory
|
# pkgconfig directory
|
||||||
LIBPC= $(LIBDIR)/pkgconfig
|
LIBPC= $(LIBDIR)/pkgconfig
|
||||||
|
|
||||||
libainstall: all python-config
|
libainstall: @DEF_MAKE_RULE@ python-config
|
||||||
@for i in $(LIBDIR) $(LIBPL) $(LIBPC); \
|
@for i in $(LIBDIR) $(LIBPL) $(LIBPC); \
|
||||||
do \
|
do \
|
||||||
if test ! -d $(DESTDIR)$$i; then \
|
if test ! -d $(DESTDIR)$$i; then \
|
||||||
|
@ -1644,7 +1644,7 @@ distclean: clobber
|
||||||
-exec rm -f {} ';'
|
-exec rm -f {} ';'
|
||||||
|
|
||||||
# Check for smelly exported symbols (not starting with Py/_Py)
|
# Check for smelly exported symbols (not starting with Py/_Py)
|
||||||
smelly: all
|
smelly: @DEF_MAKE_RULE@
|
||||||
nm -p $(LIBRARY) | \
|
nm -p $(LIBRARY) | \
|
||||||
sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
|
sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
|
||||||
|
|
||||||
|
@ -1681,7 +1681,7 @@ funny:
|
||||||
-o -print
|
-o -print
|
||||||
|
|
||||||
# Perform some verification checks on any modified files.
|
# Perform some verification checks on any modified files.
|
||||||
patchcheck: all
|
patchcheck: @DEF_MAKE_RULE@
|
||||||
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
|
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
|
@ -1114,6 +1114,7 @@ Jason Orendorff
|
||||||
Douglas Orr
|
Douglas Orr
|
||||||
William Orr
|
William Orr
|
||||||
Michele Orrù
|
Michele Orrù
|
||||||
|
Tomáš Orsava
|
||||||
Oleg Oshmyan
|
Oleg Oshmyan
|
||||||
Denis S. Otkidach
|
Denis S. Otkidach
|
||||||
Peter Otten
|
Peter Otten
|
||||||
|
|
|
@ -124,6 +124,10 @@ Library
|
||||||
Build
|
Build
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
- bpo-29243: Prevent unnecessary rebuilding of Python during ``make test``,
|
||||||
|
``make install`` and some other make targets when configured with
|
||||||
|
``--enable-optimizations``.
|
||||||
|
|
||||||
- bpo-23404: Don't regenerate generated files based on file modification time
|
- bpo-23404: Don't regenerate generated files based on file modification time
|
||||||
anymore: the action is now explicit. Replace ``make touch`` with
|
anymore: the action is now explicit. Replace ``make touch`` with
|
||||||
``make regen-all``.
|
``make regen-all``.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue