]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-103053: Fix make check-clean-src: check "python" program (GH-110449) (...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 6 Oct 2023 01:10:39 +0000 (18:10 -0700)
committerGitHub <noreply@github.com>
Fri, 6 Oct 2023 01:10:39 +0000 (01:10 +0000)
gh-103053: Fix make check-clean-src: check "python" program (GH-110449)

"make check-clean-src" now also checks if the "python" program is
found in the source directory: fail with an error if it does exist.
(cherry picked from commit a155f9f3427578ca5706d27e20bd0576f0395073)

Co-authored-by: Victor Stinner <vstinner@python.org>
Makefile.pre.in
Misc/NEWS.d/next/Build/2023-10-06-02-15-23.gh-issue-103053.--7JUF.rst [new file with mode: 0644]

index f84ab130ddbd2e9fb2323627d3a7bf34683f3b75..1dd8189167aa21f378fd336b6b78495cb24a0ad2 100644 (file)
@@ -592,7 +592,8 @@ build_wasm: check-clean-src $(BUILDPYTHON) platform oldsharedmods python-config
 # Check that the source is clean when building out of source.
 check-clean-src:
        @if test -n "$(VPATH)" -a \( \
-           -f "$(srcdir)/Programs/python.o" \
+           -f "$(srcdir)/$(BUILDPYTHON)" \
+           -o -f "$(srcdir)/Programs/python.o" \
            -o -f "$(srcdir)\Python/frozen_modules/importlib._bootstrap.h" \
        \); then \
                echo "Error: The source directory ($(srcdir)) is not clean" ; \
diff --git a/Misc/NEWS.d/next/Build/2023-10-06-02-15-23.gh-issue-103053.--7JUF.rst b/Misc/NEWS.d/next/Build/2023-10-06-02-15-23.gh-issue-103053.--7JUF.rst
new file mode 100644 (file)
index 0000000..81aa213
--- /dev/null
@@ -0,0 +1,3 @@
+"make check-clean-src" now also checks if the "python" program is found in
+the source directory: fail with an error if it does exist. Patch by Victor
+Stinner.