Patchwork [3/3] Don't use -I for common subdirectory

login
register
mail settings
Submitter Tom Tromey
Date Jan. 23, 2019, 5:29 p.m.
Message ID <20190123172954.24421-4-tom@tromey.com>
Download mbox | patch
Permalink /patch/31197/
State New
Headers show

Comments

Tom Tromey - Jan. 23, 2019, 5:29 p.m.
This changes the Makefiles to remove the -I for the common/
subdirectory.  This will enforce the rule that includes must use the
'common/filename.h' form.

2019-01-23  Tom Tromey  <tom@tromey.com>

	* Makefile.in (GDB_CFLAGS): Don't add -I for common.

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

	* Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
---
 gdb/ChangeLog             | 4 ++++
 gdb/Makefile.in           | 2 +-
 gdb/gdbserver/ChangeLog   | 4 ++++
 gdb/gdbserver/Makefile.in | 2 +-
 4 files changed, 10 insertions(+), 2 deletions(-)

Patch

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 215ef7933c..72ca855eb0 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -543,7 +543,7 @@  CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
 # your system doesn't have fcntl.h in /usr/include (which is where it
 # should be according to Posix).
 DEFS = @DEFS@
-GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/common -I$(srcdir)/config \
+GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config \
 	-DLOCALEDIR="\"$(localedir)\"" $(DEFS)
 
 # MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 4ae13692a2..8cffe3dda2 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -118,7 +118,7 @@  GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
 # in those directories should be included with the subdirectory.
 # e.g.: "target/wait.h".
 #
-INCLUDE_CFLAGS = -I. -I${srcdir} -I$(srcdir)/../common \
+INCLUDE_CFLAGS = -I. -I${srcdir} \
 	-I$(srcdir)/../regformats -I$(srcdir)/.. -I$(INCLUDE_DIR) \
 	$(INCGNU)