diff options
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r-- | Makefile.pre.in | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in index 6cb0c63..6a0118f 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -230,6 +230,7 @@ PYTHON= python$(EXE) BUILDPYTHON= python$(BUILDEXE) PYTHON_FOR_REGEN=@PYTHON_FOR_REGEN@ +UPDATE_FILE=@PYTHON_FOR_REGEN@ $(srcdir)/Tools/scripts/update_file.py PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@ _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@ BUILD_GNU_TYPE= @build@ @@ -696,12 +697,14 @@ regen-importlib: Programs/_freeze_importlib # from Lib/importlib/_bootstrap_external.py using _freeze_importlib ./Programs/_freeze_importlib \ $(srcdir)/Lib/importlib/_bootstrap_external.py \ - $(srcdir)/Python/importlib_external.h + $(srcdir)/Python/importlib_external.h.new + $(UPDATE_FILE) $(srcdir)/Python/importlib_external.h $(srcdir)/Python/importlib_external.h.new # Regenerate Python/importlib.h from Lib/importlib/_bootstrap.py # using _freeze_importlib ./Programs/_freeze_importlib \ $(srcdir)/Lib/importlib/_bootstrap.py \ - $(srcdir)/Python/importlib.h + $(srcdir)/Python/importlib.h.new + $(UPDATE_FILE) $(srcdir)/Python/importlib.h $(srcdir)/Python/importlib.h.new ############################################################################ @@ -775,8 +778,10 @@ regen-grammar: $(PGEN) # from Grammar/Grammar using pgen @$(MKDIR_P) Include $(PGEN) $(srcdir)/Grammar/Grammar \ - $(srcdir)/Include/graminit.h \ - $(srcdir)/Python/graminit.c + $(srcdir)/Include/graminit.h.new \ + $(srcdir)/Python/graminit.c.new + $(UPDATE_FILE) $(srcdir)/Include/graminit.h $(srcdir)/Include/graminit.h.new + $(UPDATE_FILE) $(srcdir)/Python/graminit.c $(srcdir)/Python/graminit.c.new Parser/grammar.o: $(srcdir)/Parser/grammar.c \ $(srcdir)/Include/token.h \ @@ -794,13 +799,15 @@ regen-ast: # Regenerate Include/Python-ast.h using Parser/asdl_c.py -h $(MKDIR_P) $(srcdir)/Include $(PYTHON_FOR_REGEN) $(srcdir)/Parser/asdl_c.py \ - -h $(srcdir)/Include \ + -h $(srcdir)/Include/Python-ast.h.new \ $(srcdir)/Parser/Python.asdl + $(UPDATE_FILE) $(srcdir)/Include/Python-ast.h $(srcdir)/Include/Python-ast.h.new # Regenerate Python/Python-ast.c using Parser/asdl_c.py -c $(MKDIR_P) $(srcdir)/Python $(PYTHON_FOR_REGEN) $(srcdir)/Parser/asdl_c.py \ - -c $(srcdir)/Python \ + -c $(srcdir)/Python/Python-ast.c.new \ $(srcdir)/Parser/Python.asdl + $(UPDATE_FILE) $(srcdir)/Python/Python-ast.c $(srcdir)/Python/Python-ast.c.new .PHONY: regen-opcode regen-opcode: @@ -808,7 +815,8 @@ regen-opcode: # using Tools/scripts/generate_opcode_h.py $(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_opcode_h.py \ $(srcdir)/Lib/opcode.py \ - $(srcdir)/Include/opcode.h + $(srcdir)/Include/opcode.h.new + $(UPDATE_FILE) $(srcdir)/Include/opcode.h $(srcdir)/Include/opcode.h.new Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h @@ -865,7 +873,8 @@ regen-opcode-targets: # Regenerate Python/opcode_targets.h from Lib/opcode.py # using Python/makeopcodetargets.py $(PYTHON_FOR_REGEN) $(srcdir)/Python/makeopcodetargets.py \ - $(srcdir)/Python/opcode_targets.h + $(srcdir)/Python/opcode_targets.h.new + $(UPDATE_FILE) $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/opcode_targets.h.new Python/ceval.o: $(srcdir)/Python/opcode_targets.h $(srcdir)/Python/ceval_gil.h @@ -892,7 +901,8 @@ regen-typeslots: # using Objects/typeslots.py $(PYTHON_FOR_REGEN) $(srcdir)/Objects/typeslots.py \ < $(srcdir)/Include/typeslots.h \ - $(srcdir)/Objects/typeslots.inc + $(srcdir)/Objects/typeslots.inc.new + $(UPDATE_FILE) $(srcdir)/Objects/typeslots.inc $(srcdir)/Objects/typeslots.inc.new ############################################################################ # Header files |