summaryrefslogtreecommitdiff
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorKushal Das <kushaldas@gmail.com>2014-04-15 23:50:06 +0530
committerKushal Das <kushaldas@gmail.com>2014-04-15 23:50:06 +0530
commit02d23a212a1e8e45a29e06d3f91e119610b682a3 (patch)
treeb80ae813af32578a07c9fbe75dc60dfee0fb7af8 /Makefile.pre.in
parentcec96144755bc75bc82d34a27e17ebe4eb300992 (diff)
downloadcpython-git-02d23a212a1e8e45a29e06d3f91e119610b682a3.tar.gz
Closes Issue 17861: Autogenerate Include/opcode.h from opcode.py.
It includes required changes in Makefile.pre.in and configure.ac among other files.
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 5af61e3d9c..fbec3b7a68 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -323,6 +323,13 @@ PGENSRCS= $(PSRCS) $(PGSRCS)
PGENOBJS= $(POBJS) $(PGOBJS)
##########################################################################
+# opcode.h generation
+OPCODE_H_DIR= Include
+OPCODE_H_SCRIPT= Tools/scripts/generate_opcode_h.py
+OPCODE_H= $(srcdir)/$(OPCODE_H_DIR)/opcode.h
+OPCODE_H_GEN= @OPCODEHGEN@ $(OPCODE_H_SCRIPT) Lib/ $(OPCODE_H)
+#
+##########################################################################
# AST
AST_H_DIR= Include
AST_H= $(AST_H_DIR)/Python-ast.h
@@ -760,6 +767,9 @@ $(AST_C): $(AST_H) $(AST_ASDL) $(ASDLGEN_FILES)
$(MKDIR_P) $(AST_C_DIR)
$(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL)
+$(OPCODE_H): $(srcdir)/Lib/opcode.py $(OPCODE_H_SCRIPT)
+ $(OPCODE_H_GEN)
+
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -871,7 +881,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/node.h \
$(srcdir)/Include/object.h \
$(srcdir)/Include/objimpl.h \
- $(srcdir)/Include/opcode.h \
+ $(OPCODE_H) \
$(srcdir)/Include/osdefs.h \
$(srcdir)/Include/patchlevel.h \
$(srcdir)/Include/pgen.h \