public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] gnulib: allow control over srcdir
Date: Tue,  8 Jun 2021 18:06:39 -0400	[thread overview]
Message-ID: <20210608220639.1975-1-vapier@gentoo.org> (raw)

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


             reply	other threads:[~2021-06-08 22:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 22:06 Mike Frysinger [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210608220639.1975-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).