@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
--- /dev/null
+Fixed the ``check-clean-src`` step performed on out of tree builds to detect
+errant ``$(srcdir)/Python/frozen_modules/*.h`` files and recommend
+appropriate source tree cleanup steps to get a working build again.