public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gnulib: allow control over srcdir
@ 2021-06-08 22:06 Mike Frysinger
  2021-06-09 14:47 ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2021-06-08 22:06 UTC (permalink / raw)
  To: gdb-patches

The current setting assumes that gnulib is only used by dirs
immediately under the source root.  Trying to build it two or
more levels deep fails.  Add a variable so users can control.
---
 gnulib/Makefile.gnulib.inc.in | 6 +++++-
 sim/common/Make-common.in     | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnulib/Makefile.gnulib.inc.in b/gnulib/Makefile.gnulib.inc.in
index 822f892a189a..fc3d63c39f18 100644
--- a/gnulib/Makefile.gnulib.inc.in
+++ b/gnulib/Makefile.gnulib.inc.in
@@ -36,9 +36,13 @@ ifndef GNULIB_BUILDDIR
 $(error missing GNULIB_BUILDDIR)
 endif
 
+ifndef GNULIB_SRCDIR
+GNULIB_SRCDIR = $(srcdir)/../gnulib
+endif
+
 LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a
 LIBGNU_EXTRA_LIBS = @FREXPL_LIBM@ @FREXP_LIBM@ @INET_NTOP_LIB@ \
                     @LIBTHREAD@ @LIB_GETLOGIN@ @LIB_GETRANDOM@ \
                     @LIB_HARD_LOCALE@ @LIB_MBRTOWC@ \
                     @LIB_SETLOCALE_NULL@ @LIBINTL@ @LIB_SELECT@ @LIBSOCKET@
-INCGNU = -I$(srcdir)/../gnulib/import -I$(GNULIB_BUILDDIR)/import
+INCGNU = -I$(GNULIB_SRCDIR)/import -I$(GNULIB_BUILDDIR)/import
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 4b2587985379..3ea840d935e0 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -41,6 +41,7 @@ srcroot = $(srcdir)/../..
 srcsim = $(srcdir)/..
 
 # Helper code from gnulib.
+GNULIB_SRCDIR = $(srcroot)/gnulib
 GNULIB_BUILDDIR = ../../gnulib
 include $(GNULIB_BUILDDIR)/Makefile.gnulib.inc
 
-- 
2.31.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-14 15:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 22:06 [PATCH] gnulib: allow control over srcdir Mike Frysinger
2021-06-09 14:47 ` Tom Tromey
2021-06-09 16:58   ` Mike Frysinger
2021-06-10 18:15     ` Tom Tromey
2021-06-13  5:23       ` [PATCH] gnulib: define the path to gnulib's parent dir Mike Frysinger
2021-06-14 15:23         ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).