]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gas/Makefile.in
x86: add generated tables dependency check to gas
[thirdparty/binutils-gdb.git] / gas / Makefile.in
index 8324cbe999d68f2722ea5abba03660a2ad6bd121..4faf2507ba57bf7b59e145c0d68c91ba88d9cfdd 100644 (file)
@@ -905,6 +905,10 @@ EXTRA_as_new_SOURCES = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
 EXPECT = expect
 RUNTEST = runtest
 RUNTESTFLAGS = 
+i386_tbl_deps = $(srcdir)/../opcodes/i386-opc.tbl \
+       $(srcdir)/../opcodes/i386-reg.tbl \
+       $(srcdir)/../opcodes/i386-gen.c $(srcdir)/../opcodes/i386-opc.h
+
 itbl_test_SOURCES = itbl-parse.y itbl-lex.l
 itbl_test_LDADD = itbl-tops.@OBJEXT@ itbl-test.@OBJEXT@ $(GASLIBS) @LEXLIB@
 
@@ -2064,6 +2068,13 @@ check-DEJAGNU: site.exp
 development.exp: $(BFDDIR)/development.sh
        $(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh  \
          | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@
+
+config/tc-i386.o: $(srcdir)/../opcodes/i386-init.h $(srcdir)/../opcodes/i386-tbl.h
+
+$(srcdir)/../opcodes/i386%init.h $(srcdir)/../opcodes/i386%tbl.h: @MAINT@ $(i386_tbl_deps)
+       @echo '"$@" is outdated wrt "$?"' >&2
+       @echo 'Please rebuild from the top level or in $(CURDIR)/../opcodes/' >&2
+       @false
 config/m68k-parse.c: $(srcdir)/config/m68k-parse.y
        $(SHELL) $(YLWRAP) $(srcdir)/config/m68k-parse.y y.tab.c $@ -- $(YACCCOMPILE)
 config/m68k-parse.h: config/m68k-parse.c