summaryrefslogtreecommitdiffstats
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-08-04 01:53:40 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-08-04 01:53:40 (GMT)
commit0c859f362c77f705a235a1a8513313e5d6d01c84 (patch)
treec5a0030fb1ffb8d208afa8fac0a64cd60ea10bb4 /Makefile.pre.in
parent0de01c4b30858209a873fcc69c4cde80be608557 (diff)
parent43a94a7e2fd130ed15bd8a0a190f4d230b607514 (diff)
downloadcpython-0c859f362c77f705a235a1a8513313e5d6d01c84.zip
cpython-0c859f362c77f705a235a1a8513313e5d6d01c84.tar.gz
cpython-0c859f362c77f705a235a1a8513313e5d6d01c84.tar.bz2
Issue #27641: Merge cross-compiling improvement from 3.5
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in36
1 files changed, 10 insertions, 26 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index d9cc49b..9079c6e 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -222,7 +222,6 @@ LIBOBJS= @LIBOBJS@
PYTHON= python$(EXE)
BUILDPYTHON= python$(BUILDEXE)
-cross_compiling=@cross_compiling@
PYTHON_FOR_GEN=@PYTHON_FOR_GEN@
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
_PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
@@ -720,17 +719,13 @@ Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile
Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
$(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
-Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
- if test "$(cross_compiling)" != "yes"; then \
- ./Programs/_freeze_importlib \
- $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h; \
- fi
+Python/importlib_external.h: @GENERATED_COMMENT@ $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
+ ./Programs/_freeze_importlib \
+ $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h
-Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib
- if test "$(cross_compiling)" != "yes"; then \
- ./Programs/_freeze_importlib \
- $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h; \
- fi
+Python/importlib.h: @GENERATED_COMMENT@ $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib
+ ./Programs/_freeze_importlib \
+ $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h
############################################################################
@@ -791,22 +786,11 @@ Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile
$(IO_OBJS): $(IO_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) $(PY_LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)