Fix opcodes includes
authorTom Tromey <tom@tromey.com>
Sun, 6 Oct 2019 00:27:29 +0000 (18:27 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 23 Oct 2019 21:16:49 +0000 (15:16 -0600)
Now that gdb can unconditionally use a -I pointing at the top of the
source tree, we can remove the ugly "../opcodes/" formulation that was
needed earlier.  This patch adds the -I and cleans up these includes.

gdb/ChangeLog
2019-10-23  Tom Tromey  <tom@tromey.com>

* arc-tdep.c: Remove ".." from include.
* frv-tdep.c: Remove ".." from include.
* lm32-tdep.c: Remove ".." from include.
* microblaze-tdep.c: Remove ".." from include.
* or1k-tdep.h: Remove ".." from include.
* s12z-tdep.c: Remove ".." from include.
* Makefile.in (OPCODES_CFLAGS): Add comment.
(TOP_CFLAGS): New variable.
(INTERNAL_CFLAGS_BASE): Add TOP_CFLAGS.

Change-Id: I21428726d55f9fab0c9da90b56f6664f258cf91a

gdb/ChangeLog
gdb/Makefile.in
gdb/arc-tdep.c
gdb/frv-tdep.c
gdb/lm32-tdep.c
gdb/mep-tdep.c
gdb/microblaze-tdep.c
gdb/or1k-tdep.h
gdb/s12z-tdep.c

index 7dd596e72c9a479265acac0f7f7abe5285e568dc..09adb916c0aca0426940bccaf2a30ed7fe6893cf 100644 (file)
@@ -1,3 +1,15 @@
+2019-10-23  Tom Tromey  <tom@tromey.com>
+
+       * arc-tdep.c: Remove ".." from include.
+       * frv-tdep.c: Remove ".." from include.
+       * lm32-tdep.c: Remove ".." from include.
+       * microblaze-tdep.c: Remove ".." from include.
+       * or1k-tdep.h: Remove ".." from include.
+       * s12z-tdep.c: Remove ".." from include.
+       * Makefile.in (OPCODES_CFLAGS): Add comment.
+       (TOP_CFLAGS): New variable.
+       (INTERNAL_CFLAGS_BASE): Add TOP_CFLAGS.
+
 2019-10-23  Tom Tromey  <tom@tromey.com>
 
        * Makefile.in (READLINE_DIR): Update.
index fe599b417ed5d934c79206c9f169ce556bc13db6..c9243731aaefd42be5727a7537fcc82ef5f4ba00 100644 (file)
@@ -459,8 +459,12 @@ OPCODES = $(OPCODES_DIR)/libopcodes.a
 # Where are the other opcode tables which only have header file
 # versions?
 OP_INCLUDE = $(INCLUDE_DIR)/opcode
+# See TOP_CFLAGS as well.
 OPCODES_CFLAGS = -I$(OP_INCLUDE)
 
+# Allow includes like "opcodes/mumble.h".
+TOP_CFLAGS = -I$(top_srcdir)/..
+
 # The simulator is usually nonexistent; targets that include one
 # should set this to list all the .o or .a files to be linked in.
 SIM = @SIM@
@@ -576,7 +580,7 @@ INTERNAL_CFLAGS_BASE = \
        $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) $(ZLIBINC) \
        $(BFD_CFLAGS) $(INCLUDE_CFLAGS) $(LIBDECNUMBER_CFLAGS) \
        $(INTL_CFLAGS) $(INCGNU) $(ENABLE_CFLAGS) $(INTERNAL_CPPFLAGS) \
-       $(SRCHIGH_CFLAGS)
+       $(SRCHIGH_CFLAGS) $(TOP_CFLAGS)
 INTERNAL_WARN_CFLAGS = $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS)
 INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
 
index 7f44702d6b18204fd1bef2fe793bfb70bf957b5a..6bcd9b119179ca1ad7c4f0e60499c737ef974b52 100644 (file)
@@ -33,7 +33,7 @@
 
 /* ARC header files.  */
 #include "opcode/arc.h"
-#include "../opcodes/arc-dis.h"
+#include "opcodes/arc-dis.h"
 #include "arc-tdep.h"
 
 /* Standard headers.  */
index 866b9e9b6ce2a79ade7a58342e0edb0f57c1e3d6..76354042fd061966aa97762eb8e37567b8bff61a 100644 (file)
@@ -29,7 +29,7 @@
 #include "dis-asm.h"
 #include "sim-regno.h"
 #include "gdb/sim-frv.h"
-#include "../opcodes/frv-desc.h"       /* for the H_SPR_... enums */
+#include "opcodes/frv-desc.h"  /* for the H_SPR_... enums */
 #include "symtab.h"
 #include "elf-bfd.h"
 #include "elf/frv.h"
index 1f746d250cdca51df1479fe085a906cf01281cfa..088f0355bb84a32c45f9413c6e1c32e7778328ef 100644 (file)
@@ -35,7 +35,7 @@
 #include "regcache.h"
 #include "trad-frame.h"
 #include "reggroups.h"
-#include "../opcodes/lm32-desc.h"
+#include "opcodes/lm32-desc.h"
 #include <algorithm>
 
 /* Macros to extract fields from an instruction.  */
index 056b61a3b34a95a759c166ca94b1378d4a676677..41eef91a1264683839e04cb081ec4a74e5c2144b 100644 (file)
@@ -48,8 +48,8 @@
 
 /* Get the user's customized MeP coprocessor register names from
    libopcodes.  */
-#include "../opcodes/mep-desc.h"
-#include "../opcodes/mep-opc.h"
+#include "opcodes/mep-desc.h"
+#include "opcodes/mep-opc.h"
 
 \f
 /* The gdbarch_tdep structure.  */
index 1248acbdc9e3d44eef9f7f41af3478bac0da2350..44bfe7f361e143967cbbf12770c4bed0e079a7ab 100644 (file)
@@ -34,8 +34,8 @@
 #include "dwarf2-frame.h"
 #include "osabi.h"
 #include "target-descriptions.h"
-#include "../opcodes/microblaze-opcm.h"
-#include "../opcodes/microblaze-dis.h"
+#include "opcodes/microblaze-opcm.h"
+#include "opcodes/microblaze-dis.h"
 #include "microblaze-tdep.h"
 #include "remote.h"
 
index e66c4a16c5f0b0d26c67c7dbc85edde0f24a6250..fbd3e955137bcc49e5e4e4668e960304d20148e0 100644 (file)
@@ -23,8 +23,8 @@
 #define TARGET_OR1K
 #endif
 
-#include "../opcodes/or1k-desc.h"
-#include "../opcodes/or1k-opc.h"
+#include "opcodes/or1k-desc.h"
+#include "opcodes/or1k-opc.h"
 
 /* General Purpose Registers */
 #define OR1K_ZERO_REGNUM          0
index 1f3a9e2053f5b550c52d21645101679e03eb6e34..094698d469aa936684cfada6c114da697ef60be3 100644 (file)
@@ -30,7 +30,7 @@
 #include "opcode/s12z.h"
 #include "trad-frame.h"
 #include "remote.h"
-#include "../opcodes/s12z-opc.h"
+#include "opcodes/s12z-opc.h"
 
 /* Two of the registers included in S12Z_N_REGISTERS are
    the CCH and CCL "registers" which are just views into