Skip to content

Commit

Permalink
Restore previous behavior of 'make regen-cases' (python#106541)
Browse files Browse the repository at this point in the history
When running 'make regen-cases' just to check whether anything changed,
it's annoying that even if nothing changes, the output files are touched,
causing an expensiv rebuild of _bootstrap_python and anything it creates.

So use  consistently for all output files.
  • Loading branch information
gvanrossum authored Jul 8, 2023
1 parent ffe70c4 commit 48d5d32
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,18 @@ regen-opcode-targets:
regen-cases:
# Regenerate various files from Python/bytecodes.c
PYTHONPATH=$(srcdir)/Tools/cases_generator \
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/cases_generator/generate_cases.py -l
$(PYTHON_FOR_REGEN) \
$(srcdir)/Tools/cases_generator/generate_cases.py \
--emit-line-directives \
-o $(srcdir)/Python/generated_cases.c.h.new \
-m $(srcdir)/Python/opcode_metadata.h.new \
-e $(srcdir)/Python/executor_cases.c.h.new \
-p $(srcdir)/Lib/_opcode_metadata.py.new \
$(srcdir)/Python/bytecodes.c
$(UPDATE_FILE) $(srcdir)/Python/generated_cases.c.h $(srcdir)/Python/generated_cases.c.h.new
$(UPDATE_FILE) $(srcdir)/Python/opcode_metadata.h $(srcdir)/Python/opcode_metadata.h.new
$(UPDATE_FILE) $(srcdir)/Python/executor_cases.c.h $(srcdir)/Python/executor_cases.c.h.new
$(UPDATE_FILE) $(srcdir)/Lib/_opcode_metadata.py $(srcdir)/Lib/_opcode_metadata.py.new

Python/compile.o: $(srcdir)/Python/opcode_metadata.h

Expand Down

0 comments on commit 48d5d32

Please sign in to comment.