PYTHON= python$(EXE)
BUILDPYTHON= python$(BUILDEXE)
+cross_compiling=@cross_compiling@
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
_PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
HOST_GNU_TYPE= @host@
Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule.h
-$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
- @$(MKDIR_P) Include
- $(MAKE) $(PGEN)
- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-$(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
- $(MAKE) $(GRAMMAR_H)
- touch $(GRAMMAR_C)
+$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
+ @$(MKDIR_P) Include
+ if test "$(cross_compiling)" != "yes"; then \
+ $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \
+ else \
+ cp $(srcdir)/Include/graminit.h $(GRAMMAR_H); \
+ fi
+$(GRAMMAR_C): $(GRAMMAR_H)
+ if test "$(cross_compiling)" != "yes"; then \
+ touch $(GRAMMAR_C); \
+ else \
+ cp $(srcdir)/Python/graminit.c $(GRAMMAR_C); \
+ fi
$(PGEN): $(PGENOBJS)
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
Build
-----
+- Issue #22359: Avoid incorrect recursive $(MAKE), and disable the rules for
+ running pgen when cross-compiling. The pgen output is normally saved with
+ the source code anyway, and is still regenerated when doing a native build.
+ Patch by Jonas Wagner and Xavier de Gaye.
+
- Issue #19450: Update Windows builds to use SQLite 3.8.11.0.
- Issue #17603: Avoid error about nonexistant fileblocks.o file by using a
AC_CONFIG_SRCDIR([Include/object.h])
AC_CONFIG_HEADER(pyconfig.h)
+AC_SUBST(cross_compiling)
AC_CANONICAL_HOST
AC_SUBST(build)
AC_SUBST(host)