Message ID | 8a8de6a9-37b8-cad3-c818-be903037fe48@redhat.com |
---|---|
State | New |
Headers | show |
On 1/15/20 2:41 PM, Pedro Alves wrote: > Don't know what I think of gnulib headers including <config.h>. > Maybe we should rename gdb's config.h to gdb-config.h too. Hit reply to soon. I meant to add, ... and then, add a manually-written config.h in the build dir that does: #include <gdbsupport/support-config.h> #include <gdb-config.h> We'd do the same to gdbsupport, add a config.h in its build dir that does: #include "gnulib/config.h" #include <support-config.h> Those config.h files would go in the build dirs so that they're not picked by other build directories. With that, any "#include <config.h>" in any header ends up picking the currently-being-built project's config.h, plus the dependencies' config.h files. Just a half-baked thought. Not sure it's the best idea. Thanks, Pedro Alves
diff --git a/gdbsupport/Makefile.am b/gdbsupport/Makefile.am index 1a001a00817..fdf376b2e12 100644 --- a/gdbsupport/Makefile.am +++ b/gdbsupport/Makefile.am @@ -21,7 +21,7 @@ AUTOMAKE_OPTIONS = no-dist foreign ACLOCAL_AMFLAGS = -I . -I ../config AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../gdb \ - -I../gnulib/import -I$(srcdir)/../gnulib/import \ + -I../gnulib -I../gnulib/import -I$(srcdir)/../gnulib/import \ -I.. -I$(srcdir)/.. $(INCINTL) -I../bfd -I$(srcdir)/../bfd override CC := $(CXX) diff --git a/gdbsupport/Makefile.in b/gdbsupport/Makefile.in index 5723ae5e97e..c3e6b744ec0 100644 --- a/gdbsupport/Makefile.in +++ b/gdbsupport/Makefile.in @@ -347,7 +347,7 @@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = no-dist foreign ACLOCAL_AMFLAGS = -I . -I ../config AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../gdb \ - -I../gnulib/import -I$(srcdir)/../gnulib/import \ + -I../gnulib -I../gnulib/import -I$(srcdir)/../gnulib/import \ -I.. -I$(srcdir)/.. $(INCINTL) -I../bfd -I$(srcdir)/../bfd noinst_LIBRARIES = libgdbsupport.a