changeset: 101771:ffed402528c7 branch: 2.7 parent: 101757:71fc5b246f5b 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 71fc5b246f5b -r ffed402528c7 Makefile.pre.in --- a/Makefile.pre.in Sun Jun 05 17:35:43 2016 -0700 +++ b/Makefile.pre.in Tue Jun 07 00:27:17 2016 +0000 @@ -685,13 +685,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 71fc5b246f5b -r ffed402528c7 Misc/NEWS --- a/Misc/NEWS Sun Jun 05 17:35:43 2016 -0700 +++ b/Misc/NEWS Tue Jun 07 00:27:17 2016 +0000 @@ -321,6 +321,9 @@ - Issue #19450: Update Windows builds to use SQLite 3.8.11.0. +- Issue #27229: Fix the cross-compiling pgen rule for in-tree builds. Patch + by Xavier de Gaye. + - Issue #17603: Avoid error about nonexistant fileblocks.o file by using a lower-level check for st_blocks in struct stat.