[2/4] gdb/doc: don't try to copy GDBvn.texi from the source tree

Message ID 2575da42cc2fe75091abb9e34cebe0fbc4e31523.1715420013.git.aburgess@redhat.com
State New
Headers
Series gdb/doc: build fixes and improvements |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed

Commit Message

Andrew Burgess May 11, 2024, 9:37 a.m. UTC
  Long ago we used to carry a copy of GDBvn.texi in the source tree.
The build recipe for gdb.dvi and gdb.pdf contained instructions for
copying this file from the source tree if the file had not been
generated.

That's right, we also have a rule that builds GDBvn.texi, and
GDBvn.texi is in the dependency list for both gdb.dvi and gdb.pdf.

On top of this, GDBvn.texi was removed from the source tree in 2000,
in this commit:

  commit 1171f8d754f71e35fd2f6c4e82b00f3c685e515f
  Date:   Tue Feb 8 03:37:34 2000 +0000

      2000-02-07  Jason Molenda  (jsm@bugshack.cygnus.com)

I think we can assume that everyone is happy generating GDBvn.texi, so
lets remove the redundant copying code.
---
 gdb/doc/Makefile.in | 17 -----------------
 1 file changed, 17 deletions(-)
  

Comments

Tom Tromey May 13, 2024, 4:12 p.m. UTC | #1
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:

Andrew> That's right, we also have a rule that builds GDBvn.texi, and
Andrew> GDBvn.texi is in the dependency list for both gdb.dvi and gdb.pdf.

Andrew> On top of this, GDBvn.texi was removed from the source tree in 2000,
Andrew> in this commit:

Andrew>   commit 1171f8d754f71e35fd2f6c4e82b00f3c685e515f
Andrew>   Date:   Tue Feb 8 03:37:34 2000 +0000

Andrew>       2000-02-07  Jason Molenda  (jsm@bugshack.cygnus.com)

Andrew> I think we can assume that everyone is happy generating GDBvn.texi, so
Andrew> lets remove the redundant copying code.

I am not sure about this change.

I downloaded gdb-14.2.tar.xz and I do see gdb/doc/GDBvn.texi in the
source tree there.  I think this is done because we also ship the .info
files, so that users won't have to have makeinfo in order to build.

(I'm not sure how well that plan really works since there used to be
open bugs about not building when makeinfo is missing ... not sure of
the current state.)

Tom
  
Eli Zaretskii May 13, 2024, 5:33 p.m. UTC | #2
> From: Tom Tromey <tom@tromey.com>
> Cc: gdb-patches@sourceware.org
> Date: Mon, 13 May 2024 10:12:35 -0600
> 
> >>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
> 
> Andrew> That's right, we also have a rule that builds GDBvn.texi, and
> Andrew> GDBvn.texi is in the dependency list for both gdb.dvi and gdb.pdf.
> 
> Andrew> On top of this, GDBvn.texi was removed from the source tree in 2000,
> Andrew> in this commit:
> 
> Andrew>   commit 1171f8d754f71e35fd2f6c4e82b00f3c685e515f
> Andrew>   Date:   Tue Feb 8 03:37:34 2000 +0000
> 
> Andrew>       2000-02-07  Jason Molenda  (jsm@bugshack.cygnus.com)
> 
> Andrew> I think we can assume that everyone is happy generating GDBvn.texi, so
> Andrew> lets remove the redundant copying code.
> 
> I am not sure about this change.
> 
> I downloaded gdb-14.2.tar.xz and I do see gdb/doc/GDBvn.texi in the
> source tree there.  I think this is done because we also ship the .info
> files, so that users won't have to have makeinfo in order to build.

Right.  So I don't think we should remove GDBvn.texi from the tarball.

> (I'm not sure how well that plan really works since there used to be
> open bugs about not building when makeinfo is missing ... not sure of
> the current state.)

Building GDB doesn't require running makeinfo, at least it didn't in
GDB 14.
  
Andrew Burgess May 14, 2024, 1:32 p.m. UTC | #3
Eli Zaretskii <eliz@gnu.org> writes:

>> From: Tom Tromey <tom@tromey.com>
>> Cc: gdb-patches@sourceware.org
>> Date: Mon, 13 May 2024 10:12:35 -0600
>> 
>> >>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
>> 
>> Andrew> That's right, we also have a rule that builds GDBvn.texi, and
>> Andrew> GDBvn.texi is in the dependency list for both gdb.dvi and gdb.pdf.
>> 
>> Andrew> On top of this, GDBvn.texi was removed from the source tree in 2000,
>> Andrew> in this commit:
>> 
>> Andrew>   commit 1171f8d754f71e35fd2f6c4e82b00f3c685e515f
>> Andrew>   Date:   Tue Feb 8 03:37:34 2000 +0000
>> 
>> Andrew>       2000-02-07  Jason Molenda  (jsm@bugshack.cygnus.com)
>> 
>> Andrew> I think we can assume that everyone is happy generating GDBvn.texi, so
>> Andrew> lets remove the redundant copying code.
>> 
>> I am not sure about this change.
>> 
>> I downloaded gdb-14.2.tar.xz and I do see gdb/doc/GDBvn.texi in the
>> source tree there.  I think this is done because we also ship the .info
>> files, so that users won't have to have makeinfo in order to build.
>
> Right.  So I don't think we should remove GDBvn.texi from the tarball.

OK, I'll drop this patch.  I'll likely post the inverse patch at some
point -- we have other recipes that use GDBvn.texi, but don't include
the copy code, so maybe they should?

I'll take another look, including trying with a release tar ball, maybe
there's a reason why some rules that depend on GDBvn.texi, while others
don't.... but that can all wait for some future patch.

>
>> (I'm not sure how well that plan really works since there used to be
>> open bugs about not building when makeinfo is missing ... not sure of
>> the current state.)
>
> Building GDB doesn't require running makeinfo, at least it didn't in
> GDB 14.

I'll double check the status of this after these changes.

Thanks,
Andrew
  
Pedro Alves June 14, 2024, 7:06 p.m. UTC | #4
On 2024-05-13 17:12, Tom Tromey wrote:
>>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
> 
> Andrew> That's right, we also have a rule that builds GDBvn.texi, and
> Andrew> GDBvn.texi is in the dependency list for both gdb.dvi and gdb.pdf.
> 
> Andrew> On top of this, GDBvn.texi was removed from the source tree in 2000,
> Andrew> in this commit:
> 
> Andrew>   commit 1171f8d754f71e35fd2f6c4e82b00f3c685e515f
> Andrew>   Date:   Tue Feb 8 03:37:34 2000 +0000
> 
> Andrew>       2000-02-07  Jason Molenda  (jsm@bugshack.cygnus.com)
> 
> Andrew> I think we can assume that everyone is happy generating GDBvn.texi, so
> Andrew> lets remove the redundant copying code.
> 
> I am not sure about this change.
> 
> I downloaded gdb-14.2.tar.xz and I do see gdb/doc/GDBvn.texi in the
> source tree there.  I think this is done because we also ship the .info
> files, so that users won't have to have makeinfo in order to build.
> 
> (I'm not sure how well that plan really works since there used to be
> open bugs about not building when makeinfo is missing ... not sure of
> the current state.)

Sometimes filesystem timestamps will end up messed up and building a
release will want to rebuild the docs.  But you can always work around
that with "make MAKEINFO=true".
  

Patch

diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index 3f3fe7b7ed9..9e3ce018e86 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -477,15 +477,6 @@  gdb-cfg.texi: ${srcdir}/${DOC_CONFIG}-cfg.texi
 	ln ${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi || \
 	cp ${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi
 
-# GDB MANUAL: texinfo source, using @set/@clear/@value/@ifset/@ifclear
-# If your texinfo or makeinfo don't support these, get a new texinfo release
-#
-# The nonsense with GDBvn.texi gets this to run with both Sun and GNU make.
-#   Note that we can *generate* GDBvn.texi, but since we distribute one in the
-#   source directory for the benefit of people who *don't* use this makefile,
-#   VPATH will often tell make not to bother building it, because the one
-#   in the srcdir is up to date.  (if not, then make should build one here).
-
 # Clean these up before each run.  Avoids a catch 22 with not being
 # able to re-generate these files (to fix a corruption) because these
 # files contain a corruption.
@@ -494,10 +485,6 @@  GDB_TEX_TMPS = gdb.aux gdb.cp* gdb.fn* gdb.ky* gdb.log gdb.pg* gdb.toc \
 
 # GDB MANUAL: TeX dvi file
 gdb.dvi: ${GDB_DOC_FILES}
-	$(SILENCE) if [ ! -f ./GDBvn.texi ]; then \
-		(test "$(LN_S)" = "ln -s" && ln -s $(srcdir)/GDBvn.texi .) || \
-		ln $(srcdir)/GDBvn.texi . || \
-		cp $(srcdir)/GDBvn.texi . ; else true; fi
 	$(SILENCE) rm -f $(GDB_TEX_TMPS)
 	$(ECHO_TEXI2DVI) $(TEXI2DVI) $(SILENT_Q_FLAG) $(READLINE_TEXI_INCFLAG) \
 		-I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
@@ -506,10 +493,6 @@  gdb.ps: gdb.dvi
 	$(ECHO_DVIPS) $(DVIPS) $(SILENT_Q_FLAG) -o $@ $?
 
 gdb.pdf: ${GDB_DOC_FILES}
-	$(SILENCE) if [ ! -f ./GDBvn.texi ]; then \
-		(test "$(LN_S)" = "ln -s" && ln -s $(srcdir)/GDBvn.texi .) || \
-		ln $(srcdir)/GDBvn.texi . || \
-		cp $(srcdir)/GDBvn.texi . ; else true; fi
 	$(SILENCE) rm -f $(GDB_TEX_TMPS)
 	$(ECHO_TEXI2DVI) $(TEXI2DVI) $(SILENT_Q_FLAG) --pdf \
 		$(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) \