From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2156) id 4137638493CA; Mon, 13 Feb 2023 14:16:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4137638493CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676297763; bh=upYmnwqnS+Lx6IaTEFUhJ7mTcMeh3Ah1JnqKb2YmUXQ=; h=From:To:Subject:Date:From; b=H5Fh0hz56ErKGMdFP7tWdj3pDMuxXv2/usN1sA4zr0QQ8M0NkUETpK4Hrd2RD7cdT LGDQu0tgP2DFeIA9L1LVmoZ6Gf6nchJrh0J9m9qfiXMa6VEqnNrine0Key52wGWRN6 b/IhDBFpPaUwnt/iX5dLr1HSH3jCIiUQkNCDhOS4= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Keith Seitz To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Fix doc build dependencies for --with-system-readline X-Act-Checkin: binutils-gdb X-Git-Author: Keith Seitz X-Git-Refname: refs/heads/master X-Git-Oldrev: b7eab2a9d4f4e92692daf14b09fc95ca11b72e30 X-Git-Newrev: 14d0e6818a022b72c265f15f63c8ccc2fc8c302a Message-Id: <20230213141603.4137638493CA@sourceware.org> Date: Mon, 13 Feb 2023 14:16:03 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D14d0e6818a02= 2b72c265f15f63c8ccc2fc8c302a commit 14d0e6818a022b72c265f15f63c8ccc2fc8c302a Author: Keith Seitz Date: Mon Feb 13 06:14:40 2023 -0800 Fix doc build dependencies for --with-system-readline =20 PR build/30108 concerns building gdb documentation with --with-sytem-readline. If the in-tree readline directory is missing, though, the docs will fail to build: =20 make[4]: Entering directory '/home/keiths/work/readline-doc-issue/linux= /gdb/doc' make[4]: *** No rule to make target '../../../src/gdb/doc/../../readlin= e/readline/doc/rluser.texi', needed by 'gdb.info'. Stop. =20 The listed file (and hsuser.texi) are conditionally included by gdb.tex= info. When system readline is used, gdb/configure.ac will leave READLINE_TEXI_INCFLAGS empty, causing doc/Makefile.in to output a line = to $BUILD/doc/GDBvn.texi with "@set SYSTEM_READLINE". This surpresses the inclusion of the missing files. They are not needed or used in this scenario. =20 However, GDB_DOC_SOURCE_INCLUDES always lists these two files as depend= encies, thus provoking the build error whenever readline/ is missing. =20 This patch fixes this by creating (essentially) a conditional setting o= f the dependencies to be included from readline. Diff: --- gdb/configure | 8 ++++++-- gdb/configure.ac | 3 +++ gdb/doc/Makefile.in | 8 ++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gdb/configure b/gdb/configure index 8b2039912e7..1114bcdc0af 100755 --- a/gdb/configure +++ b/gdb/configure @@ -746,6 +746,7 @@ LIBEXPAT HAVE_LIBEXPAT JIT_READER_DIR TARGET_PTR +READLINE_DOC_SOURCE_INCLUDES READLINE_TEXI_INCFLAG READLINE_CFLAGS READLINE_DEPS @@ -11449,7 +11450,7 @@ else lt_dlunknown=3D0; lt_dlno_uscore=3D1; lt_dlneed_uscore=3D2 lt_status=3D$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11452 "configure" +#line 11453 "configure" #include "confdefs.h" =20 #if HAVE_DLFCN_H @@ -11555,7 +11556,7 @@ else lt_dlunknown=3D0; lt_dlno_uscore=3D1; lt_dlneed_uscore=3D2 lt_status=3D$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11558 "configure" +#line 11559 "configure" #include "confdefs.h" =20 #if HAVE_DLFCN_H @@ -20793,17 +20794,20 @@ $as_echo "$gdb_cv_readline_ok" >&6; } READLINE_DEPS=3D READLINE_CFLAGS=3D READLINE_TEXI_INCFLAG=3D + READLINE_DOC_SOURCE_INCLUDES=3D'$(READLINE_SYSTEM_DOC_INCLUDES)' else READLINE=3D'$(READLINE_DIR)/libreadline.a' READLINE_DEPS=3D'$(READLINE)' READLINE_CFLAGS=3D'-I$(READLINE_SRC)/..' READLINE_TEXI_INCFLAG=3D'-I $(READLINE_DIR)' + READLINE_DOC_SOURCE_INCLUDES=3D'$(READLINE_INTREE_DOC_INCLUDES)' fi =20 =20 =20 =20 =20 + # Generate jit-reader.h =20 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h diff --git a/gdb/configure.ac b/gdb/configure.ac index 79eb013ce19..47e35f467f8 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -644,16 +644,19 @@ if test "$with_system_readline" =3D yes; then READLINE_DEPS=3D READLINE_CFLAGS=3D READLINE_TEXI_INCFLAG=3D + READLINE_DOC_SOURCE_INCLUDES=3D'$(READLINE_SYSTEM_DOC_INCLUDES)' else READLINE=3D'$(READLINE_DIR)/libreadline.a' READLINE_DEPS=3D'$(READLINE)' READLINE_CFLAGS=3D'-I$(READLINE_SRC)/..' READLINE_TEXI_INCFLAG=3D'-I $(READLINE_DIR)' + READLINE_DOC_SOURCE_INCLUDES=3D'$(READLINE_INTREE_DOC_INCLUDES)' fi AC_SUBST(READLINE) AC_SUBST(READLINE_DEPS) AC_SUBST(READLINE_CFLAGS) AC_SUBST(READLINE_TEXI_INCFLAG) +AC_SUBST(READLINE_DOC_SOURCE_INCLUDES) =20 # Generate jit-reader.h =20 diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in index 5d40aa229b2..110b6088905 100644 --- a/gdb/doc/Makefile.in +++ b/gdb/doc/Makefile.in @@ -121,6 +121,11 @@ PDFTEX =3D pdftex # Program to generate Postscript files from DVI files. DVIPS =3D dvips =20 +# Readline includes. +READLINE_SYSTEM_DOC_INCLUDES =3D +READLINE_INTREE_DOC_INCLUDES =3D $(READLINE_DIR)/rluser.texi $(READLINE_DI= R)/hsuser.texi +READLINE_DOC_SOURCE_INCLUDES =3D @READLINE_DOC_SOURCE_INCLUDES@ + # Main GDB manual # Note that this unconditionally includes the readline texi files, # even when --with-system-readline is used. This is harmless because @@ -129,8 +134,7 @@ GDB_DOC_SOURCE_INCLUDES =3D \ $(srcdir)/fdl.texi \ $(srcdir)/gpl.texi \ $(srcdir)/agentexpr.texi \ - $(READLINE_DIR)/rluser.texi \ - $(READLINE_DIR)/hsuser.texi + $(READLINE_DOC_SOURCE_INCLUDES) GDB_DOC_BUILD_INCLUDES =3D \ gdb-cfg.texi \ GDBvn.texi