]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gnulib: define the path to gnulib's parent dir
authorMike Frysinger <vapier@gentoo.org>
Tue, 8 Jun 2021 22:04:28 +0000 (18:04 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 14 Jun 2021 22:01:20 +0000 (18:01 -0400)
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.  Switch GNULIB_BUILDDIR to a relative
GNULIB_PARENT_DIR so that it can be used to construct both the
build & source paths.

gdb/ChangeLog
gdb/Makefile.in
gdbserver/ChangeLog
gdbserver/Makefile.in
gnulib/ChangeLog
gnulib/Makefile.gnulib.inc.in
sim/common/ChangeLog
sim/common/Make-common.in

index 7f46c4a64822bf5ef239d74975b1b3bd6c2f6e1f..4188bc8e4d3db7d6e33db505998359c7e8c42005 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-14  Mike Frysinger  <vapier@gentoo.org>
+
+       * Makefile.in (GNULIB_BUILDDIR): Rename to ...
+       (GNULIB_PARENT_DIR): ... this.  Remove "gnulib" from value.
+
 2021-06-14  John Baldwin  <jhb@FreeBSD.org>
 
        * configure.ac: Check for <sys/procctl.h>.
index f664d964536d630b8b8e66b85901a066e93b8fe1..b3d264f267cb7040808cbfec272f8e486414a08e 100644 (file)
@@ -245,8 +245,8 @@ CODESIGN_CERT = @CODESIGN_CERT@
 GDBFLAGS =
 
 # Helper code from gnulib.
-GNULIB_BUILDDIR = ../gnulib
-include $(GNULIB_BUILDDIR)/Makefile.gnulib.inc
+GNULIB_PARENT_DIR = ..
+include $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc
 
 SUPPORT = ../gdbsupport
 LIBSUPPORT = $(SUPPORT)/libgdbsupport.a
index f8d7fd65fb17a84cd9919514fd0348c54c3e4dae..9f4fcf81603f99802c48027c4c463cb2a3e716c6 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-14  Mike Frysinger  <vapier@gentoo.org>
+
+       * Makefile.in (GNULIB_BUILDDIR): Rename to ...
+       (GNULIB_PARENT_DIR): ... this.  Remove "gnulib" from value.
+
 2021-05-27  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * Fix some indentation mistakes throughout.
        * gdbreplay.c: Fix common/ includes.
        * fork-child.c: Fix common/ includes.
        * event-loop.c: Fix common/ includes.
-       * ax.c: 
-       (enum gdb_agent_op): Fix common/ includes.
+       * ax.c (enum gdb_agent_op): Fix common/ includes.
 
 2019-01-21  Tom Tromey  <tom@tromey.com>
 
index f7ade7d61d5c9e1c9a6a4abfaeb9320d86a18c84..12e9b2777aef115e686840cef56c0844919c96f5 100644 (file)
@@ -122,8 +122,8 @@ ustlibs = @ustlibs@
 ustinc = @ustinc@
 
 # gnulib
-GNULIB_BUILDDIR = ../gnulib
-include $(GNULIB_BUILDDIR)/Makefile.gnulib.inc
+GNULIB_PARENT_DIR = ..
+include $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc
 
 # Where is the INTL library?  Typically in ../intl.
 INTL = @LIBINTL@
index 223b66324ee8eb931a670db63d97ef9a38362280..f571a99eb7393af6bffc9f32dfdd68fe1c4d1943 100644 (file)
@@ -1,3 +1,10 @@
+2021-06-14  Mike Frysinger  <vapier@gentoo.org>
+
+       * Makefile.gnulib.inc.in (GNULIB_BUILDDIR): Rename to ...
+       (GNULIB_PARENT_DIR): ... this.
+       (LIBGNU): Add "/gnulib" after $(GNULIB_PARENT_DIR).
+       (INCGNU): Likewise.  Replace .. with $(GNULIB_PARENT_DIR).
+
 2021-06-08  Mike Frysinger  <vapier@gentoo.org>
 
        * update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add netdb.
index 822f892a189a1154d0168ce46cdda48a81d15e62..cf69b835cfda3ee09e0b36d2aa13c90f47fd6173 100644 (file)
 # INCGNU: A list of -I.... include paths that should be passed to the
 #        compiler, these are where the gnulib headers can be found.
 
-ifndef GNULIB_BUILDDIR
-$(error missing GNULIB_BUILDDIR)
+# Packages must define the relative path to gnulib's parent dir.
+ifndef GNULIB_PARENT_DIR
+$(error missing GNULIB_PARENT_DIR)
 endif
 
-LIBGNU = $(GNULIB_BUILDDIR)/import/libgnu.a
+LIBGNU = $(GNULIB_PARENT_DIR)/gnulib/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$(srcdir)/$(GNULIB_PARENT_DIR)/gnulib/import \
+         -I$(GNULIB_PARENT_DIR)/gnulib/import
index 8f44658c7d3f20fa5c0ce55ac7245085f3d1b15b..5bf47a368499cf874c743f096b0ccaf398eea424 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-14  Mike Frysinger  <vapier@gentoo.org>
+
+       * Make-common.in (GNULIB_BUILDDIR): Rename to ...
+       (GNULIB_PARENT_DIR): ... this.  Remove "gnulib" from value.
+
 2021-06-12  Mike Frysinger  <vapier@gentoo.org>
 
        * Make-common.in (COMMON_OBJS_NAMES): Add portability.o.
index 7a5bbc1a985c3a78c03d6202f85e52feaeb11e27..3dab9ca1fd140ad7d936759f25298e71647976a1 100644 (file)
@@ -41,8 +41,8 @@ srcroot = $(srcdir)/../..
 srcsim = $(srcdir)/..
 
 # Helper code from gnulib.
-GNULIB_BUILDDIR = ../../gnulib
-include $(GNULIB_BUILDDIR)/Makefile.gnulib.inc
+GNULIB_PARENT_DIR = ../..
+include $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc
 
 prefix = @prefix@
 exec_prefix = @exec_prefix@