aboutsummaryrefslogtreecommitdiff
path: root/opcodes/Makefile.am
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2018-07-19 08:28:29 +0200
committerJan Beulich <jbeulich@suse.com>2018-07-19 08:28:29 +0200
commitc30be56ebf7989e36f5c7d4a703cb00f7d4ca2ab (patch)
tree6f5a4a23c2d56878e002fe9b566dc9dc81f06503 /opcodes/Makefile.am
parente387da76fc6ee61f6bc30edfa1210be173e96db4 (diff)
downloadgdb-c30be56ebf7989e36f5c7d4a703cb00f7d4ca2ab.zip
gdb-c30be56ebf7989e36f5c7d4a703cb00f7d4ca2ab.tar.gz
gdb-c30be56ebf7989e36f5c7d4a703cb00f7d4ca2ab.tar.bz2
x86: pre-process opcodes table before parsing
Instead of expanding macro-like constructs in i386-gen, have the C pre- processor do this for us. Besides being a prerequisite for the next template folding steps, this also paves the way for removing various hidden dependencies between #define-s in i386-opc.h and plain literal numbers used in i386-opc.tbl. The #undef of None is solely to leave the generated i386-tbl.h entirely unchanged.
Diffstat (limited to 'opcodes/Makefile.am')
-rw-r--r--opcodes/Makefile.am6
1 files changed, 4 insertions, 2 deletions
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 11d3f76..a571f2b 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -544,8 +544,10 @@ i386-gen.o: i386-gen.c i386-opc.h $(srcdir)/../include/opcode/i386.h \
$(srcdir)/i386-tbl.h: $(srcdir)/i386-init.h
@echo $@
-$(srcdir)/i386-init.h: @MAINT@ i386-gen$(EXEEXT_FOR_BUILD) i386-opc.tbl i386-reg.tbl
- ./i386-gen$(EXEEXT_FOR_BUILD) --srcdir $(srcdir)
+$(srcdir)/i386-init.h: @MAINT@ i386-gen$(EXEEXT_FOR_BUILD) i386-opc.tbl i386-reg.tbl i386-opc.h
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) - \
+ < $(srcdir)/i386-opc.tbl \
+ | ./i386-gen$(EXEEXT_FOR_BUILD) --srcdir $(srcdir)
i386-opc.lo: $(srcdir)/i386-tbl.h