public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: gdb-patches@sourceware.org
Cc: Andrew Burgess <aburgess@redhat.com>
Subject: [PATCHv2 1/5] gdb/doc: don't try to copy GDBvn.texi from the source tree
Date: Fri, 31 May 2024 09:18:38 +0100	[thread overview]
Message-ID: <2b3a3f4263ffd12aa9d0e09024237f665bbe4255.1717142725.git.aburgess@redhat.com> (raw)
In-Reply-To: <cover.1717142725.git.aburgess@redhat.com>

The build recipe for gdb.dvi and gdb.pdf contains instructions for
copying the GDBvn.texi file from the source tree into the build
directory if the GDBvn.texi file doesn't already exist in the build
directory.

The gdb.dvi and gdb.pdf targets also have a dependency on GDBvn.texi,
and we have a recipe for building GDBvn.texi.

What's happening here is this:

  - In a git checkout of the source tree there is no GDBvn.texi in the
    source tree, the GDBvn.texi dependency will trigger a rebuild of
    GDBvn.texi, which is then used to build gdb.dvi and/or gdb.pdf.

  - In a release tar file we do include a copy of GDBvn.texi.  This
    file will appear to be up to date, and so no copy of GDBvn.texi is
    created within the build directory.  Now when building gdb.dvi
    and/or gdb.pdf we copy (or symlink) the version of GDBvn.texi from
    the source tree into the build directory.

However, copying GDBvn.texi into the source directory is completely
unnecessary.  The gdb.dvi/gdb.pdf recipes both invoke texi2dvi and
pass '-I $(srcdir)' as an argument, this means that texi2dvi will look
in the $(srcdir) to find included files, including GDBvn.texi.

As such I believe we can remove the code that copies GDBvn.texi from
the source tree into the build tree.

I've tested with a release build; creating a release with:

  ./src-release gdb

Then in an empty directory, unpacking the resulting .tar file,
creating a parallel build directory and doing the usual configure,
make, and 'make install'.

Having done this I can then 'touch gdb/doc/*.texinfo' in the unpacked
source tree, and do 'make -C gdb/doc pdf dvi' to rebuild all the pdf
and dvi files, this works fine without having to either build or copy
GDBvn.texi into the build directory.
---
 gdb/doc/Makefile.in | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index 6a112b98d0e..3a179e9799a 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) \
-- 
2.25.4


  reply	other threads:[~2024-05-31  8:18 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-11  9:37 [PATCH 0/4] gdb/doc: build fixes and improvements Andrew Burgess
2024-05-11  9:37 ` [PATCH 1/4] gdb/doc: don't delete *.pod files too early Andrew Burgess
2024-05-13 16:13   ` Tom Tromey
2024-05-14 15:53     ` Andrew Burgess
2024-05-11  9:37 ` [PATCH 2/4] gdb/doc: don't try to copy GDBvn.texi from the source tree Andrew Burgess
2024-05-13 16:12   ` Tom Tromey
2024-05-13 17:33     ` Eli Zaretskii
2024-05-14 13:32       ` Andrew Burgess
2024-06-14 19:06     ` Pedro Alves
2024-05-11  9:37 ` [PATCH 3/4] gdb/doc: fix parallel build of refcard related targets Andrew Burgess
2024-05-13 16:13   ` Tom Tromey
2024-05-11  9:37 ` [PATCH 4/4] gdb/doc: fix parallel build of pdf and dvi files Andrew Burgess
2024-05-13 16:18   ` Tom Tromey
2024-05-14 13:40     ` Andrew Burgess
2024-05-31  8:18 ` [PATCHv2 0/5] gdb/doc: parallel build fixes and improvements Andrew Burgess
2024-05-31  8:18   ` Andrew Burgess [this message]
2024-05-31  8:18   ` [PATCHv2 2/5] gdb/doc: allow for version.subst in the source tree Andrew Burgess
2024-05-31 10:40     ` Eli Zaretskii
2024-06-03 14:22       ` Andrew Burgess
2024-06-06 11:59         ` Eli Zaretskii
2024-06-06 17:52           ` Andrew Burgess
2024-05-31  8:18   ` [PATCHv2 3/5] gdb/doc: also look in srcdir when running TEXI2POD Andrew Burgess
2024-05-31  8:18   ` [PATCHv2 4/5] gdb/doc: fix parallel build of refcard related targets Andrew Burgess
2024-05-31  8:18   ` [PATCHv2 5/5] gdb/doc: fix parallel build of pdf and dvi files Andrew Burgess
2024-06-06 17:49   ` [PATCHv3 0/6] gdb/doc: parallel build fixes and improvements Andrew Burgess
2024-06-06 17:49     ` [PATCHv3 1/6] gdb/doc: don't try to copy GDBvn.texi from the source tree Andrew Burgess
2024-06-14 18:45       ` Pedro Alves
2024-06-06 17:49     ` [PATCHv3 2/6] gdb/doc: merge rules for building .1 and .5 man pages Andrew Burgess
2024-06-06 17:49     ` [PATCHv3 3/6] gdb/doc: allow for version.subst in the source tree Andrew Burgess
2024-06-14 18:44       ` Pedro Alves
2024-06-06 17:49     ` [PATCHv3 4/6] gdb/doc: also look in srcdir when running TEXI2POD Andrew Burgess
2024-06-06 17:49     ` [PATCHv3 5/6] gdb/doc: fix parallel build of refcard related targets Andrew Burgess
2024-06-06 17:49     ` [PATCHv3 6/6] gdb/doc: fix parallel build of pdf and dvi files Andrew Burgess
2024-06-14 19:00       ` Pedro Alves
2024-06-15  9:44         ` Andrew Burgess
2024-06-15 12:40           ` Eli Zaretskii
2024-06-15 14:59             ` Andrew Burgess
2024-06-15 15:04             ` Andrew Burgess
2024-06-21 15:35               ` Pedro Alves
2024-06-24 11:16                 ` Andrew Burgess
2024-06-25 13:39               ` Andrew Burgess
2024-06-14 18:14     ` [PATCHv3 0/6] gdb/doc: parallel build fixes and improvements Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2b3a3f4263ffd12aa9d0e09024237f665bbe4255.1717142725.git.aburgess@redhat.com \
    --to=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).