diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-12-21 07:47:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-21 07:47:57 (GMT) |
commit | 88e089cdbc88276d4b5898d1e39912ec14d5be80 (patch) | |
tree | 63efacb387d428792c09395896bb44c5af8beed9 /Makefile.pre.in | |
parent | 192711856bbe88e9dfeee9af00da22189047463e (diff) | |
download | cpython-88e089cdbc88276d4b5898d1e39912ec14d5be80.zip cpython-88e089cdbc88276d4b5898d1e39912ec14d5be80.tar.gz cpython-88e089cdbc88276d4b5898d1e39912ec14d5be80.tar.bz2 |
[3.12] gh-112305: Fix check-clean-src to detect frozen_modules .h files. (GH-113344) (#113346)
gh-112305: Fix check-clean-src to detect frozen_modules .h files. (GH-113344)
A typo left this check broken so many of us who do out-of-tree builds
were seeing strange failures due to bad `Python/frozen_modules/*.h`
files being picked up from the source tree and used at build time from
different Python versions leading to errors like:
`Fatal Python error: _PyImport_InitCore: failed to initialize importlib`
Or similar once our build got to an "invoke the interpreter"
bootstrapping step due to incorrect bytecode being embedded.
(cherry picked from commit 103c4ea27464cef8d1793dab347f5ff3629dc243)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r-- | Makefile.pre.in | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in index 7af1845..3f5b57c 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -625,11 +625,13 @@ check-clean-src: @if test -n "$(VPATH)" -a \( \ -f "$(srcdir)/$(BUILDPYTHON)" \ -o -f "$(srcdir)/Programs/python.o" \ - -o -f "$(srcdir)\Python/frozen_modules/importlib._bootstrap.h" \ + -o -f "$(srcdir)/Python/frozen_modules/importlib._bootstrap.h" \ \); then \ echo "Error: The source directory ($(srcdir)) is not clean" ; \ echo "Building Python out of the source tree (in $(abs_builddir)) requires a clean source tree ($(abs_srcdir))" ; \ - echo "Try to run: make -C \"$(srcdir)\" clean" ; \ + echo "Build artifacts such as .o files, executables, and Python/frozen_modules/*.h must not exist within $(srcdir)." ; \ + echo "Try to run:" ; \ + echo " (cd \"$(srcdir)\" && make clean || git clean -fdx -e Doc/venv)" ; \ exit 1; \ fi |