]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix doc build dependencies for --with-system-readline
authorKeith Seitz <keiths@redhat.com>
Mon, 13 Feb 2023 14:14:40 +0000 (06:14 -0800)
committerKeith Seitz <keiths@redhat.com>
Mon, 13 Feb 2023 14:20:58 +0000 (06:20 -0800)
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:

make[4]: Entering directory '/home/keiths/work/readline-doc-issue/linux/gdb/doc'
make[4]: *** No rule to make target '../../../src/gdb/doc/../../readline/readline/doc/rluser.texi', needed by 'gdb.info'.  Stop.

The listed file (and hsuser.texi) are conditionally included by gdb.texinfo.
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.

However, GDB_DOC_SOURCE_INCLUDES always lists these two files as dependencies,
thus provoking the build error whenever readline/ is missing.

This patch fixes this by creating (essentially) a conditional setting of the
dependencies to be included from readline.

gdb/configure
gdb/configure.ac
gdb/doc/Makefile.in

index bdea17043b55f2eb49bd5274e22eacae565f4f8d..bdc84be9c01243a81c2036d56ec4a6c824c8187a 100755 (executable)
@@ -750,6 +750,7 @@ LIBEXPAT
 HAVE_LIBEXPAT
 JIT_READER_DIR
 TARGET_PTR
+READLINE_DOC_SOURCE_INCLUDES
 READLINE_TEXI_INCFLAG
 READLINE_CFLAGS
 READLINE_DEPS
@@ -11451,7 +11452,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11454 "configure"
+#line 11455 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11557,7 +11558,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11560 "configure"
+#line 11561 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -20637,17 +20638,20 @@ $as_echo "$gdb_cv_readline_ok" >&6; }
   READLINE_DEPS=
   READLINE_CFLAGS=
   READLINE_TEXI_INCFLAG=
+  READLINE_DOC_SOURCE_INCLUDES='$(READLINE_SYSTEM_DOC_INCLUDES)'
 else
   READLINE='$(READLINE_DIR)/libreadline.a'
   READLINE_DEPS='$(READLINE)'
   READLINE_CFLAGS='-I$(READLINE_SRC)/..'
   READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
+  READLINE_DOC_SOURCE_INCLUDES='$(READLINE_INTREE_DOC_INCLUDES)'
 fi
 
 
 
 
 
+
 # Generate jit-reader.h
 
 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
index 9e52a02601ca1d80b7b144f7ca13688835b2b5b5..c81df8c4967b9eecba64df7dfb8f9a20f51bcae4 100644 (file)
@@ -591,16 +591,19 @@ if test "$with_system_readline" = yes; then
   READLINE_DEPS=
   READLINE_CFLAGS=
   READLINE_TEXI_INCFLAG=
+  READLINE_DOC_SOURCE_INCLUDES='$(READLINE_SYSTEM_DOC_INCLUDES)'
 else
   READLINE='$(READLINE_DIR)/libreadline.a'
   READLINE_DEPS='$(READLINE)'
   READLINE_CFLAGS='-I$(READLINE_SRC)/..'
   READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
+  READLINE_DOC_SOURCE_INCLUDES='$(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)
 
 # Generate jit-reader.h
 
index d1012bee98c926b68520eeacdd61485a0430a6b1..38a6b14b0966d67c4806218276417664edf80eeb 100644 (file)
@@ -121,6 +121,11 @@ PDFTEX = pdftex
 # Program to generate Postscript files from DVI files.
 DVIPS = dvips
 
+# Readline includes.
+READLINE_SYSTEM_DOC_INCLUDES =
+READLINE_INTREE_DOC_INCLUDES = $(READLINE_DIR)/rluser.texi $(READLINE_DIR)/hsuser.texi
+READLINE_DOC_SOURCE_INCLUDES = @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 = \
        $(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 = \
        gdb-cfg.texi \
        GDBvn.texi