diff options
author | Batuhan Taskaya <batuhanosmantaskaya@gmail.com> | 2020-05-18 17:42:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 17:42:10 (GMT) |
commit | 63b8e0cba3d43e53a8dd8878ee1443c8427f462d (patch) | |
tree | 7fc7f94d7ff2783ba72c319b3ec956c88a00c8e7 /Makefile.pre.in | |
parent | 7b7a21bc4fd063b26a2d1882fddc458861497812 (diff) | |
download | cpython-63b8e0cba3d43e53a8dd8878ee1443c8427f462d.zip cpython-63b8e0cba3d43e53a8dd8878ee1443c8427f462d.tar.gz cpython-63b8e0cba3d43e53a8dd8878ee1443c8427f462d.tar.bz2 |
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 dbfd805..de50f6b 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 |