From 688a6a731afdbece92db78edf91addc683fc94ba Mon Sep 17 00:00:00 2001 From: Kevin Modzelewski Date: Tue, 17 Nov 2026 13:03:13 -0800 Subject: [PATCH] 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 --- Makefile.pre.in | 2 +- .../next/Build/2026-11-17-20-12-03.gh-issue-162170.0SpcRZ.rst | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Build/2026-11-17-20-12-03.gh-issue-162170.0SpcRZ.rst diff --git a/Makefile.pre.in b/Makefile.pre.in index 5ab9a055a204667..059a94efe8f9032 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -2496,7 +2496,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.