mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
bpo-47152: Automatically regenerate sre_constants.h (GH-91439)
* Move the code for generating Modules/_sre/sre_constants.h from Lib/re/_constants.py into a separate script Tools/scripts/generate_sre_constants.py. * Add target `regen-sre` in the makefile. * Make target `regen-all` depending on `regen-sre`.
This commit is contained in:
parent
943ca5e1d6
commit
474fdbe9e4
5 changed files with 73 additions and 46 deletions
|
|
@ -1197,7 +1197,7 @@ regen-limited-abi: all
|
|||
# Regenerate all generated files
|
||||
|
||||
regen-all: regen-opcode regen-opcode-targets regen-typeslots \
|
||||
regen-token regen-ast regen-keyword regen-frozen clinic \
|
||||
regen-token regen-ast regen-keyword regen-sre regen-frozen clinic \
|
||||
regen-pegen-metaparser regen-pegen regen-test-frozenmain \
|
||||
regen-global-objects
|
||||
@echo
|
||||
|
|
@ -1350,6 +1350,13 @@ regen-stdlib-module-names: build_all Programs/_testembed
|
|||
> $(srcdir)/Python/stdlib_module_names.h.new
|
||||
$(UPDATE_FILE) $(srcdir)/Python/stdlib_module_names.h $(srcdir)/Python/stdlib_module_names.h.new
|
||||
|
||||
regen-sre:
|
||||
# Regenerate Modules/_sre/sre_constants.h from Lib/re/_constants.py
|
||||
# using Tools/scripts/generate_sre_constants.py
|
||||
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_sre_constants.py \
|
||||
$(srcdir)/Lib/re/_constants.py \
|
||||
$(srcdir)/Modules/_sre/sre_constants.h
|
||||
|
||||
Python/compile.o Python/symtable.o Python/ast_unparse.o Python/ast.o Python/future.o: $(srcdir)/Include/internal/pycore_ast.h
|
||||
|
||||
Python/getplatform.o: $(srcdir)/Python/getplatform.c
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue