public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix doc build dependencies for --with-system-readline
@ 2023-02-10 21:42 Keith Seitz
  2023-02-11 16:06 ` Tom Tromey
  2023-02-12 11:36 ` Joel Brobecker
  0 siblings, 2 replies; 6+ messages in thread
From: Keith Seitz @ 2023-02-10 21:42 UTC (permalink / raw)
  To: gdb-patches

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       | 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 113b7cf8a30..14ea40ca603 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=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11452 "configure"
+#line 11453 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11555,7 +11556,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11558 "configure"
+#line 11559 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -20790,17 +20791,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
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 7c7bf88b3fb..d1a92c883af 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -643,16 +643,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
 
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 = 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
-- 
2.39.1


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

* Re: [PATCH] Fix doc build dependencies for --with-system-readline
  2023-02-10 21:42 [PATCH] Fix doc build dependencies for --with-system-readline Keith Seitz
@ 2023-02-11 16:06 ` Tom Tromey
  2023-02-13 15:01   ` Keith Seitz
  2023-02-12 11:36 ` Joel Brobecker
  1 sibling, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2023-02-11 16:06 UTC (permalink / raw)
  To: Keith Seitz via Gdb-patches; +Cc: Keith Seitz

>>>>> "Keith" == Keith Seitz via Gdb-patches <gdb-patches@sourceware.org> writes:

Keith> PR build/30108 concerns building gdb documentation with
Keith> --with-sytem-readline.  If the in-tree readline directory is
Keith> missing, though, the docs will fail to build:

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

Thanks, this is ok.
Approved-By: Tom Tromey <tom@tromey.com>

Tom

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

* Re: [PATCH] Fix doc build dependencies for --with-system-readline
  2023-02-10 21:42 [PATCH] Fix doc build dependencies for --with-system-readline Keith Seitz
  2023-02-11 16:06 ` Tom Tromey
@ 2023-02-12 11:36 ` Joel Brobecker
  2023-02-13 15:02   ` Keith Seitz
  1 sibling, 1 reply; 6+ messages in thread
From: Joel Brobecker @ 2023-02-12 11:36 UTC (permalink / raw)
  To: Keith Seitz via Gdb-patches; +Cc: Joel Brobecker

Hi Keith,

On Fri, Feb 10, 2023 at 01:42:24PM -0800, Keith Seitz via Gdb-patches wrote:
> 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.

Thanks for the patch!

Glad to see that Tom already approved it. When pushing it, would
you mind pushing it to the gdb-13-branch as well? I'll include
that patch in the upcoming 13.1 release.

> ---
>  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 113b7cf8a30..14ea40ca603 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=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
>    lt_status=$lt_dlunknown
>    cat > conftest.$ac_ext <<_LT_EOF
> -#line 11452 "configure"
> +#line 11453 "configure"
>  #include "confdefs.h"
>  
>  #if HAVE_DLFCN_H
> @@ -11555,7 +11556,7 @@ else
>    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
>    lt_status=$lt_dlunknown
>    cat > conftest.$ac_ext <<_LT_EOF
> -#line 11558 "configure"
> +#line 11559 "configure"
>  #include "confdefs.h"
>  
>  #if HAVE_DLFCN_H
> @@ -20790,17 +20791,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
> diff --git a/gdb/configure.ac b/gdb/configure.ac
> index 7c7bf88b3fb..d1a92c883af 100644
> --- a/gdb/configure.ac
> +++ b/gdb/configure.ac
> @@ -643,16 +643,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
>  
> 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 = 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
> -- 
> 2.39.1
> 

-- 
Joel

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

* Re: [PATCH] Fix doc build dependencies for --with-system-readline
  2023-02-11 16:06 ` Tom Tromey
@ 2023-02-13 15:01   ` Keith Seitz
  0 siblings, 0 replies; 6+ messages in thread
From: Keith Seitz @ 2023-02-13 15:01 UTC (permalink / raw)
  To: Keith Seitz via Gdb-patches

On 2/11/23 08:06, Tom Tromey wrote:
>>>>>> "Keith" == Keith Seitz via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Keith> PR build/30108 concerns building gdb documentation with
> Keith> --with-sytem-readline.  If the in-tree readline directory is
> Keith> missing, though, the docs will fail to build:
> 
> ...
> Keith> This patch fixes this by creating (essentially) a conditional setting of the
> Keith> dependencies to be included from readline.
> 
> Thanks, this is ok.
> Approved-By: Tom Tromey <tom@tromey.com>

Thank you for the review; I've pushed this and cherry-picked it
for gdb-13-branch (as requested by Joel).

Keith


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

* Re: [PATCH] Fix doc build dependencies for --with-system-readline
  2023-02-12 11:36 ` Joel Brobecker
@ 2023-02-13 15:02   ` Keith Seitz
  2023-02-15  8:02     ` Joel Brobecker
  0 siblings, 1 reply; 6+ messages in thread
From: Keith Seitz @ 2023-02-13 15:02 UTC (permalink / raw)
  To: Joel Brobecker, Keith Seitz via Gdb-patches

On 2/12/23 03:36, Joel Brobecker via Gdb-patches wrote:

> Thanks for the patch!
> 
> Glad to see that Tom already approved it. When pushing it, would
> you mind pushing it to the gdb-13-branch as well? I'll include
> that patch in the upcoming 13.1 release.

I cherry-picked this to the gdb-13-branch.

Keith


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

* Re: [PATCH] Fix doc build dependencies for --with-system-readline
  2023-02-13 15:02   ` Keith Seitz
@ 2023-02-15  8:02     ` Joel Brobecker
  0 siblings, 0 replies; 6+ messages in thread
From: Joel Brobecker @ 2023-02-15  8:02 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Joel Brobecker, Keith Seitz via Gdb-patches

> > Glad to see that Tom already approved it. When pushing it, would
> > you mind pushing it to the gdb-13-branch as well? I'll include
> > that patch in the upcoming 13.1 release.
> 
> I cherry-picked this to the gdb-13-branch.

Perfect. Thanks Kevin!

-- 
Joel

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

end of thread, other threads:[~2023-02-15  8:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-10 21:42 [PATCH] Fix doc build dependencies for --with-system-readline Keith Seitz
2023-02-11 16:06 ` Tom Tromey
2023-02-13 15:01   ` Keith Seitz
2023-02-12 11:36 ` Joel Brobecker
2023-02-13 15:02   ` Keith Seitz
2023-02-15  8:02     ` Joel Brobecker

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).