Don't use -I for common subdirectory

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.

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

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

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

	* Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
This commit is contained in:
Tom Tromey
2019-01-22 00:26:45 -07:00
parent 0747795c08
commit a0707f3c36
4 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2019-01-25 Tom Tromey <tom@tromey.com>
* Makefile.in (GDB_CFLAGS): Don't add -I for common.
2019-01-25 Tom Tromey <tom@tromey.com> 2019-01-25 Tom Tromey <tom@tromey.com>
* xtensa-linux-nat.c: Fix common/ includes. * xtensa-linux-nat.c: Fix common/ includes.

View File

@ -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 # your system doesn't have fcntl.h in /usr/include (which is where it
# should be according to Posix). # should be according to Posix).
DEFS = @DEFS@ DEFS = @DEFS@
GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/common -I$(srcdir)/config \ GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config \
-DLOCALEDIR="\"$(localedir)\"" $(DEFS) -DLOCALEDIR="\"$(localedir)\"" $(DEFS)
# MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory. # MH_CFLAGS, if defined, has host-dependent CFLAGS from the config directory.

View File

@ -1,3 +1,7 @@
2019-01-25 Tom Tromey <tom@tromey.com>
* Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2019-01-25 Tom Tromey <tom@tromey.com> 2019-01-25 Tom Tromey <tom@tromey.com>
* win32-low.c: Fix common/ includes. * win32-low.c: Fix common/ includes.

View File

@ -118,7 +118,7 @@ GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
# in those directories should be included with the subdirectory. # in those directories should be included with the subdirectory.
# e.g.: "target/wait.h". # 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) \ -I$(srcdir)/../regformats -I$(srcdir)/.. -I$(INCLUDE_DIR) \
$(INCGNU) $(INCGNU)