diff options
author | 2020-05-18 20:42:10 +0300 | |
---|---|---|
committer | 2020-05-18 18:42:10 +0100 | |
commit | 63b8e0cba3d43e53a8dd8878ee1443c8427f462d (patch) | |
tree | 7fc7f94d7ff2783ba72c319b3ec956c88a00c8e7 /Makefile.pre.in | |
parent | bpo-40661: Fix segfault when parsing invalid input (GH-20165) (diff) | |
download | cpython-63b8e0cba3d43e53a8dd8878ee1443c8427f462d.tar.gz cpython-63b8e0cba3d43e53a8dd8878ee1443c8427f462d.tar.bz2 cpython-63b8e0cba3d43e53a8dd8878ee1443c8427f462d.zip |
bpo-40528: Improve AST generation script to do builds simultaneously (GH-19968)
- Switch from getopt to argparse.
- Removed the limitation of not being able to produce both C and H simultaneously.
This will make it run faster since it parses the asdl definition once and uses the generated tree to generate both the header and the C source.
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r-- | Makefile.pre.in | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in index dbfd805f1a..de50f6b7f7 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -845,17 +845,15 @@ regen-pegen: .PHONY=regen-ast regen-ast: - # Regenerate Include/Python-ast.h using Parser/asdl_c.py -h + # Regenerate Include/Python-ast.h and Python/Python-ast.c using Parser/asdl_c.py $(MKDIR_P) $(srcdir)/Include - $(PYTHON_FOR_REGEN) $(srcdir)/Parser/asdl_c.py \ - -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/Python-ast.c.new \ - $(srcdir)/Parser/Python.asdl + $(srcdir)/Parser/Python.asdl \ + -H $(srcdir)/Include/Python-ast.h.new \ + -C $(srcdir)/Python/Python-ast.c.new + + $(UPDATE_FILE) $(srcdir)/Include/Python-ast.h $(srcdir)/Include/Python-ast.h.new $(UPDATE_FILE) $(srcdir)/Python/Python-ast.c $(srcdir)/Python/Python-ast.c.new .PHONY: regen-opcode |