]> granicus.if.org Git - python/commitdiff
[3.5] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478) (...
authortorsava <torsava@redhat.com>
Tue, 9 May 2017 15:12:35 +0000 (17:12 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 9 May 2017 15:12:35 +0000 (17:12 +0200)
* 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 commit a1054c3b0037d4c2a5492e79fc193f36245366c7)

Makefile.pre.in
Misc/ACKS
Misc/NEWS

index 04ef1a12019c15883cd6b316f8579430c0fd1f9d..144c1f8629bcd567982937fddf1770736cf23e78 100644 (file)
@@ -984,7 +984,7 @@ TESTTIMEOUT=        3600
 
 # Run a basic set of regression tests.
 # This excludes some tests that are particularly resource-intensive.
-test:          all platform
+test:          @DEF_MAKE_RULE@ platform
                $(TESTRUNNER) $(TESTOPTS)
 
 # Run the full test suite twice - once without .pyc files, and once with.
@@ -994,7 +994,7 @@ test:               all platform
 # 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
 # sample data.
-testall:       all platform
+testall:       @DEF_MAKE_RULE@ platform
                -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
                $(TESTPYTHON) -E $(srcdir)/Lib/compileall.py
                -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
@@ -1003,7 +1003,7 @@ testall:  all platform
 
 # Run the test suite for both architectures in a Universal build on OSX.
 # Must be run on an Intel box.
-testuniversal: all platform
+testuniversal: @DEF_MAKE_RULE@ platform
                if [ `arch` != 'i386' ];then \
                        echo "This can only be used on OSX/i386" ;\
                        exit 1 ;\
@@ -1026,7 +1026,7 @@ QUICKTESTOPTS=    $(TESTOPTS) -x test_subprocess test_io test_lib2to3 \
                test_multiprocessing_forkserver \
                test_mailbox test_socket test_poll \
                test_select test_zipfile test_concurrent_futures
-quicktest:     all platform
+quicktest:     @DEF_MAKE_RULE@ platform
                $(TESTRUNNER) $(QUICKTESTOPTS)
 
 
@@ -1378,7 +1378,7 @@ LIBPL=            @LIBPL@
 # pkgconfig directory
 LIBPC=         $(LIBDIR)/pkgconfig
 
-libainstall:   all python-config
+libainstall:   @DEF_MAKE_RULE@ python-config
        @for i in $(LIBDIR) $(LIBPL) $(LIBPC); \
        do \
                if test ! -d $(DESTDIR)$$i; then \
@@ -1639,7 +1639,7 @@ distclean: clobber
                                     -exec rm -f {} ';'
 
 # Check for smelly exported symbols (not starting with Py/_Py)
-smelly: all
+smelly: @DEF_MAKE_RULE@
        nm -p $(LIBRARY) | \
                sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
 
@@ -1677,7 +1677,7 @@ funny:
                -o -print
 
 # Perform some verification checks on any modified files.
-patchcheck: all
+patchcheck: @DEF_MAKE_RULE@
        $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
 
 # Dependencies
index babd4950da679733e12c62efe5ae4b7b869588fa..2d2436c9c3b8c165a91c3658f1cc64646b728da1 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1096,6 +1096,7 @@ Jason Orendorff
 Douglas Orr
 William Orr
 Michele Orrù
+Tomáš Orsava
 Oleg Oshmyan
 Denis S. Otkidach
 Peter Otten
index 06e464ffc89d803341a211372fb6098d57cfba44..889386dba05de42a4249bf2b228c732db000a057 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -211,6 +211,10 @@ Documentation
 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
   anymore: the action is now explicit. Replace ``make touch`` with
   ``make regen-all``.