changeset: 101769:619f7a2aa40a branch: 3.5 parent: 101758:f5fd646b265b user: Martin Panter date: Tue Jun 07 00:27:17 2016 +0000 files: Makefile.pre.in Misc/NEWS description: Issue #27229: Fix in-tree cross-build rule, by Xavier de Gaye diff -r f5fd646b265b -r 619f7a2aa40a Makefile.pre.in --- a/Makefile.pre.in Sun Jun 05 17:38:48 2016 -0700 +++ b/Makefile.pre.in Tue Jun 07 00:27:17 2016 +0000 @@ -793,13 +793,16 @@ if test "$(cross_compiling)" != "yes"; then \ $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \ else \ - cp $(srcdir)/Include/graminit.h $(GRAMMAR_H); \ + # Avoid copying the file onto itself for an in-tree build \ + cp $(srcdir)/Include/graminit.h $(GRAMMAR_H).tmp; \ + mv $(GRAMMAR_H).tmp $(GRAMMAR_H); \ fi $(GRAMMAR_C): $(GRAMMAR_H) if test "$(cross_compiling)" != "yes"; then \ touch $(GRAMMAR_C); \ else \ - cp $(srcdir)/Python/graminit.c $(GRAMMAR_C); \ + cp $(srcdir)/Python/graminit.c $(GRAMMAR_C).tmp; \ + mv $(GRAMMAR_C).tmp $(GRAMMAR_C); \ fi $(PGEN): $(PGENOBJS) diff -r f5fd646b265b -r 619f7a2aa40a Misc/NEWS --- a/Misc/NEWS Sun Jun 05 17:38:48 2016 -0700 +++ b/Misc/NEWS Tue Jun 07 00:27:17 2016 +0000 @@ -581,6 +581,9 @@ source code anyway, and is still regenerated when doing a native build. Patch by Xavier de Gaye. +- Issue #27229: Fix the cross-compiling pgen rule for in-tree builds. Patch + by Xavier de Gaye. + - Issue #21668: Link audioop, _datetime, _ctypes_test modules to libm, except on Mac OS X. Patch written by Xavier de Gaye.