]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-103053: Fix make check-clean-src: check "python" program (#110449)
authorVictor Stinner <vstinner@python.org>
Fri, 6 Oct 2023 00:46:52 +0000 (02:46 +0200)
committerGitHub <noreply@github.com>
Fri, 6 Oct 2023 00:46:52 +0000 (00:46 +0000)
"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.

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 f1f5c8557e7ffc48e14640e7861f14ae0866c855..40951a8af7a6e0baf114319c1218e151ab854905 100644 (file)
@@ -624,7 +624,8 @@ build_wasm: check-clean-src $(BUILDPYTHON) platform sharedmods \
 .PHONY: check-clean-src
 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.