File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -791,7 +791,7 @@ Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile
791791
792792$(IO_OBJS): $(IO_H)
793793
794- $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
794+ $(GRAMMAR_H): $(GRAMMAR_INPUT) @PGEN_DEPENDENCY@
795795 @$(MKDIR_P) Include
796796 # Avoid copying the file onto itself for an in-tree build
797797 if test "$(cross_compiling)" != "yes"; then \
Original file line number Diff line number Diff line change @@ -1131,6 +1131,7 @@ Steven Pemberton
11311131Bo Peng
11321132Santiago Peresón
11331133George Peristerakis
1134+ Thomas Perl
11341135Mathieu Perreault
11351136Mark Perrego
11361137Trevor Perrin
Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ Windows
8080Build
8181-----
8282
83+ - Issue #27490: Do not build pgen when cross-compiling. Patch by Thomas
84+ Perl.
85+
8386- Issue #26662: Set PYTHON_FOR_GEN in configure as the Python program to be
8487 used for file generation during the build.
8588
Original file line number Diff line number Diff line change @@ -740,6 +740,7 @@ UNIVERSALSDK
740740CONFIG_ARGS
741741SOVERSION
742742VERSION
743+ PGEN_DEPENDENCY
743744PYTHON_FOR_BUILD
744745PYTHON_FOR_GEN
745746host_os
@@ -3050,14 +3051,17 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; }
30503051$as_echo " $interp " >&6 ; }
30513052 PYTHON_FOR_BUILD=' _PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) ' $interp
30523053 fi
3054+ PGEN_DEPENDENCY=' '
30533055elif test " $cross_compiling " = maybe; then
30543056 as_fn_error $? " Cross compiling required --host=HOST-TUPLE and --build=ARCH" " $LINENO " 5
30553057else
30563058 PYTHON_FOR_BUILD=' ./$(BUILDPYTHON) -E'
3059+ PGEN_DEPENDENCY=' $(PGEN)'
30573060fi
30583061
30593062
30603063
3064+
30613065if test " $prefix " ! = " /" ; then
30623066 prefix=` echo " $prefix " | sed -e ' s/\/$//g' `
30633067fi
Original file line number Diff line number Diff line change @@ -81,12 +81,15 @@ if test "$cross_compiling" = yes; then
8181 AC_MSG_RESULT ( $interp )
8282 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
8383 fi
84+ PGEN_DEPENDENCY=''
8485elif test "$cross_compiling" = maybe; then
8586 AC_MSG_ERROR ( [ Cross compiling required --host=HOST-TUPLE and --build=ARCH] )
8687else
8788 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
89+ PGEN_DEPENDENCY='$(PGEN)'
8890fi
8991AC_SUBST ( PYTHON_FOR_BUILD )
92+ AC_SUBST ( PGEN_DEPENDENCY )
9093
9194dnl Ensure that if prefix is specified, it does not end in a slash. If
9295dnl it does, we get path names containing '//' which is both ugly and
You can’t perform that action at this time.
0 commit comments