@@ -290,8 +290,11 @@ HOSTRUNNER= @HOSTRUNNER@
290
290
PYTHON_FOR_REGEN?=@PYTHON_FOR_REGEN@
291
291
UPDATE_FILE=$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/update_file.py
292
292
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
293
+ # Single-platform builds depend on $(BUILDPYTHON). Cross builds use an
294
+ # external "build Python" and have an empty PYTHON_FOR_BUILD_DEPS.
295
+ PYTHON_FOR_BUILD_DEPS=@PYTHON_FOR_BUILD_DEPS@
293
296
294
- # Normal builds use Programs/_freeze_module.c for bootstrapping and
297
+ # Single-platform builds use Programs/_freeze_module.c for bootstrapping and
295
298
# ./_bootstrap_python Programs/_freeze_module.py for remaining modules
296
299
# Cross builds use an external "build Python" for all modules.
297
300
PYTHON_FOR_FREEZE=@PYTHON_FOR_FREEZE@
@@ -700,7 +703,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
700
703
$(BUILDPYTHON): Programs/python.o $(LINK_PYTHON_DEPS)
701
704
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
702
705
703
- platform: $(BUILDPYTHON ) pybuilddir.txt
706
+ platform: $(PYTHON_FOR_BUILD_DEPS ) pybuilddir.txt
704
707
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
705
708
706
709
# Create build directory and generate the sysconfig build-time data there.
@@ -710,7 +713,7 @@ platform: $(BUILDPYTHON) pybuilddir.txt
710
713
# problems by creating a dummy pybuilddir.txt just to allow interpreter
711
714
# initialization to succeed. It will be overwritten by generate-posix-vars
712
715
# or removed in case of failure.
713
- pybuilddir.txt: $(BUILDPYTHON )
716
+ pybuilddir.txt: $(PYTHON_FOR_BUILD_DEPS )
714
717
@echo "none" > ./pybuilddir.txt
715
718
$(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars ;\
716
719
if test $$? -ne 0 ; then \
@@ -729,7 +732,7 @@ $(srcdir)/Modules/_blake2/blake2s_impl.c: $(srcdir)/Modules/_blake2/blake2b_impl
729
732
# -s, --silent or --quiet is always the first char.
730
733
# Under BSD make, MAKEFLAGS might be " -s -v x=y".
731
734
# Ignore macros passed by GNU make, passed after --
732
- sharedmods: $(BUILDPYTHON ) pybuilddir.txt @LIBMPDEC_INTERNAL@ @LIBEXPAT_INTERNAL@
735
+ sharedmods: $(PYTHON_FOR_BUILD_DEPS ) pybuilddir.txt @LIBMPDEC_INTERNAL@ @LIBEXPAT_INTERNAL@
733
736
@case "`echo X $$MAKEFLAGS | sed 's/^X //;s/ -- .*//'`" in \
734
737
*\ -s*|s*) quiet="-q";; \
735
738
*) quiet="";; \
0 commit comments