summaryrefslogtreecommitdiff
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-07-29 05:52:32 +0000
committerMartin Panter <vadmium+py@gmail.com>2016-07-29 05:52:32 +0000
commitbc82de084c494482faf3f9e45cd455c0d72a3f3c (patch)
tree6a94c2ac56a979c45fb49879fc3da88163122501 /Makefile.pre.in
parent692497a3064b8bd78743f4172bf4d17c9bdf9117 (diff)
downloadcpython-git-bc82de084c494482faf3f9e45cd455c0d72a3f3c.tar.gz
Issue #27641: Comment out regeneration rules when cross compiling
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in20
1 files changed, 4 insertions, 16 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index ccfdd59952..3aafca892a 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -200,7 +200,6 @@ UNICODE_OBJS= @UNICODE_OBJS@
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@
@@ -680,22 +679,11 @@ Modules/grpmodule.o: $(srcdir)/Modules/grpmodule.c $(srcdir)/Modules/posixmodule
Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule.h
-$(GRAMMAR_H): $(GRAMMAR_INPUT) @PGEN_DEPENDENCY@
+$(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN)
@$(MKDIR_P) Include
- # Avoid copying the file onto itself for an in-tree build
- if test "$(cross_compiling)" != "yes"; then \
- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \
- else \
- 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).tmp; \
- mv $(GRAMMAR_C).tmp $(GRAMMAR_C); \
- fi
+ $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+$(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H)
+ touch $(GRAMMAR_C)
$(PGEN): $(PGENOBJS)
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)