https://github.com/python/cpython/commit/1502c9ae650d8ab89c1c6466498bb88eb2dc3b88
commit: 1502c9ae650d8ab89c1c6466498bb88eb2dc3b88
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: itamaro <[email protected]>
date: 2026-11-17T21:49:49Z
summary:

[3.14] gh-162170: Makefile: have "install" depend on pgo (GH-95287) (#162177)

gh-162170: Makefile: have "install" depend on pgo (GH-95287)

Previously, `make install` would ignore PGO. This isn't an
issue if one runs `make && make install`, since `make` will
build with pgo (if requested) and then `make install` won't
rebuild anything.

But if one simply does `./configure --enable-optimizations && make install`,
the build system would build a non-PGO build and then install that.

This commit changes the Makefile so that `install` depends on
`all`, which includes PGO when requested.
(cherry picked from commit 715d34fc38f84bbccf9feaf937477290e575b060)

Co-authored-by: Kevin Modzelewski <[email protected]>

files:
A Misc/NEWS.d/next/Build/2026-11-17-20-12-03.gh-issue-162170.0SpcRZ.rst
M Makefile.pre.in

diff --git a/Makefile.pre.in b/Makefile.pre.in
index aae2313ebd27de5..16a06e0059fd09d 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -2436,7 +2436,7 @@ sharedinstall: all
 # Install the interpreter with $(VERSION) affixed
 # This goes into $(exec_prefix)
 .PHONY: altbininstall
-altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
+altbininstall: all @FRAMEWORKPYTHONW@
        @for i in $(BINDIR) $(LIBDIR); \
        do \
                if test ! -d $(DESTDIR)$$i; then \
diff --git 
a/Misc/NEWS.d/next/Build/2026-11-17-20-12-03.gh-issue-162170.0SpcRZ.rst 
b/Misc/NEWS.d/next/Build/2026-11-17-20-12-03.gh-issue-162170.0SpcRZ.rst
new file mode 100644
index 000000000000000..caa4b13ce303395
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2026-11-17-20-12-03.gh-issue-162170.0SpcRZ.rst
@@ -0,0 +1,3 @@
+``make install`` now depends on the ``all`` target, so running it directly
+after ``./configure --enable-optimizations`` installs the PGO-optimized
+interpreter rather than an unoptimized build.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to