public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Arsen Arsenović" <arsen@aarsen.me>
To: Gerald Pfeifer <gerald@pfeifer.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] update_web_docs_git: Add updated Texinfo to PATH
Date: Tue, 11 Apr 2023 00:15:58 +0200	[thread overview]
Message-ID: <86a5zf2x7x.fsf@aarsen.me> (raw)
In-Reply-To: <f2b204f8-dd53-0f0f-4bad-bd301c4345a6@pfeifer.com>


[-- Attachment #1.1: Type: text/plain, Size: 671 bytes --]


Gerald Pfeifer <gerald@pfeifer.com> writes:

> On Thu, 6 Apr 2023, Arsen Arsenović wrote:
>> maintainer-scripts/ChangeLog:
>> 
>> 	* update_web_docs_git: Add updated Texinfo to PATH
>
> Do we really need to adjust PATH, or could we just introduce a MAKEINFO 
> variable, something like
>
>   if [ x${MAKEINFO}x = xx ]; then
>     if [ -x /home/gccadmin/texinfo/install-git/bin/makeinfo ]; then
>       MAKEINFO=/home/gccadmin/texinfo/install-git/bin/makeinfo;
>     else
>       MAKEINFO=makeinfo
>     fi
>   fi
>
> ?
>
> (This also still allows overriding upon invocation.)
>
> Gerald

Ah!  Good idea.  What do you think of the following?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: [PATCH] update_web_docs_git: Allow setting TEXI2*, add git build --]
[-- Type: text/x-patch, Size: 2119 bytes --]

From ba00aa3882b7e0a5fa247f9fa824474e3ddc8102 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
Date: Thu, 6 Apr 2023 12:20:57 +0200
Subject: [PATCH] update_web_docs_git: Allow setting TEXI2*, add git build
 default

maintainer-scripts/ChangeLog:

	* update_web_docs_git: Add a mechanism to override makeinfo,
	texi2dvi and texi2pdf, and default them to
	/home/gccadmin/texinfo/install-git/bin/${tool}, if present.
---
 maintainer-scripts/update_web_docs_git | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/maintainer-scripts/update_web_docs_git b/maintainer-scripts/update_web_docs_git
index d44ab27c1b7..c651e567424 100755
--- a/maintainer-scripts/update_web_docs_git
+++ b/maintainer-scripts/update_web_docs_git
@@ -14,6 +14,17 @@ export GITROOT
 
 PATH=/usr/local/bin:$PATH
 
+makeinfo_git=/home/gccadmin/texinfo/install-git/bin/
+if [ -x "${makeinfo_git}"/makeinfo ]; then
+    : "${MAKEINFO:=${makeinfo_git}/makeinfo}"
+    : "${TEXI2DVI:=${makeinfo_git}/texi2dvi}"
+    : "${TEXI2PDF:=${makeinfo_git}/texi2pdf}"
+else
+    : "${MAKEINFO:=makeinfo}"
+    : "${TEXI2DVI:=texi2dvi}"
+    : "${TEXI2PDF:=texi2pdf}"
+fi
+
 MANUALS="cpp
   cppinternals
   fastjar
@@ -174,10 +185,10 @@ for file in $MANUALS; do
     elif [ "$file" = "gnat_ugn" ]; then
       includes="$includes -I gcc/gcc/ada -I gcc/gcc/ada/doc/gnat_ugn"
     fi
-    makeinfo --html -c CONTENTS_OUTPUT_LOCATION=inline --css-ref $CSS $includes -o ${file} ${filename}
+    "${MAKEINFO}" --html -c CONTENTS_OUTPUT_LOCATION=inline --css-ref $CSS $includes -o ${file} ${filename}
     tar cf ${file}-html.tar ${file}/*.html
-    texi2dvi $includes -o ${file}.dvi ${filename} </dev/null >/dev/null && dvips -o ${file}.ps ${file}.dvi
-    texi2pdf $includes -o ${file}.pdf ${filename} </dev/null
+    "${TEXI2DVI}" $includes -o ${file}.dvi ${filename} </dev/null >/dev/null && dvips -o ${file}.ps ${file}.dvi
+    "${TEXI2PDF}" $includes -o ${file}.pdf ${filename} </dev/null
     mkdir -p $DOCSDIR/$file
   fi
 done
-- 
2.38.0


[-- Attachment #1.3: Type: text/plain, Size: 96 bytes --]


... since the other tools are siblings.

Thanks for the smoke test!
-- 
Arsen Arsenović

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 381 bytes --]

  reply	other threads:[~2023-04-10 22:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 10:35 Arsen Arsenović
2023-04-10 21:45 ` Gerald Pfeifer
2023-04-10 22:15   ` Arsen Arsenović [this message]
2023-04-14 19:29     ` Gerald Pfeifer
2023-04-14 20:25       ` Arsen Arsenović
2023-04-20 20:14         ` Gerald Pfeifer
2023-04-20 20:53           ` Arsen Arsenović
2023-04-21  7:00             ` Gerald Pfeifer
2023-04-21  8:46               ` Arsen Arsenović
2023-04-10 21:49 ` Gerald Pfeifer

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=86a5zf2x7x.fsf@aarsen.me \
    --to=arsen@aarsen.me \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gerald@pfeifer.com \
    /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).