Message ID | 20230406103533.1087349-1-arsen@aarsen.me |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F04853858433 for <patchwork@sourceware.org>; Thu, 6 Apr 2023 10:38:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F04853858433 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680777501; bh=ak0DNAbvLmVQhs4fkWlOmChSCrbNjjA2RNcetcdkJnA=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=XFbwdHI71rQ0ibm08JDPGSvV6CJdoaxtx2yIpfmkVJSOlpEFj5saW+/Nke3LsEvyF StVgBFznb+7tWW4e2VOlon2Jne04Iqg/sP22dJj7PHhPKMmjAGRKpU7Nw/oT+KyZXv UIdZXgbmTsogkUa+xhdCV+b4FGlOtjrYfZugF5mU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) by sourceware.org (Postfix) with ESMTPS id 5B22A3858CDA for <gcc-patches@gcc.gnu.org>; Thu, 6 Apr 2023 10:37:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5B22A3858CDA Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4PsdHd30Ypz9sZ1; Thu, 6 Apr 2023 12:37:49 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Gerald Pfeifer <gerald@pfeifer.com>, =?utf-8?q?Arsen_Arsenovi=C4=87?= <arsen@aarsen.me> Subject: [PATCH] update_web_docs_git: Add updated Texinfo to PATH Date: Thu, 6 Apr 2023 12:35:34 +0200 Message-Id: <20230406103533.1087349-1-arsen@aarsen.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4PsdHd30Ypz9sZ1 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= <gcc-patches@gcc.gnu.org> Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= <arsen@aarsen.me> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
update_web_docs_git: Add updated Texinfo to PATH
|
|
Commit Message
Arsen Arsenović
April 6, 2023, 10:35 a.m. UTC
maintainer-scripts/ChangeLog: * update_web_docs_git: Add updated Texinfo to PATH --- Hi, I'm posting this as a ping and a patch necessary to get the wwwdocs building with the new Texinfo version that's installed on gcc.gnu.org. It would be nice to do this ahead of the GCC 13 release. I must ask that whoever decides to apply/update the script tests texi2any with a simple example, like echo @node Top | ~/texinfo/install-git/bin/makeinfo --html -o - ... before updating; this should be a representative enough smoke test. You should see some HTML output with little text in it. It might also be wise to test the script directly by using a different WWWBASE, just in case, even though it should be safe. Thanks in advance, have a lovely day. maintainer-scripts/update_web_docs_git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
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
On Thu, 6 Apr 2023, Arsen Arsenović wrote: > I must ask that whoever decides to apply/update the script tests > texi2any with a simple example, like > > echo @node Top | ~/texinfo/install-git/bin/makeinfo --html -o - > > ... before updating; this should be a representative enough smoke test. > You should see some HTML output with little text in it. Yep, and one warning: -: warning: must specify a title with a title command or @top The following then proceeds without warning and the output looks fine: printf "@title foo\n@node Top" | /home/gccadmin/texinfo/install-git/bin/makeinfo --html -o - Gerald
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? ... since the other tools are siblings. Thanks for the smoke test!
On Tue, 11 Apr 2023, Arsen Arsenović wrote:
> Ah! Good idea. What do you think of the following?
Did you intentionally not implement the following part of my suggestion
if [ x${MAKEINFO}x = xx ]; then
:
that is, allowing to override from the command-line (or crontab)?
And why the colons in
+ : "${MAKEINFO:=${makeinfo_git}/makeinfo}"
+ : "${TEXI2DVI:=${makeinfo_git}/texi2dvi}"
+ : "${TEXI2PDF:=${makeinfo_git}/texi2pdf}"
? I don't think we use these elsewhere. Do they serve a purpose or can we
omit them and keep things simpler?
Please let me know, and I'll see to get this (or probably an updated
patch) in place on gcc.gnu.org.
Thanks,
Gerald
Gerald Pfeifer <gerald@pfeifer.com> writes: > On Tue, 11 Apr 2023, Arsen Arsenović wrote: >> Ah! Good idea. What do you think of the following? > > Did you intentionally not implement the following part of my suggestion > > if [ x${MAKEINFO}x = xx ]; then > : > > that is, allowing to override from the command-line (or crontab)? > > > And why the colons in > > + : "${MAKEINFO:=${makeinfo_git}/makeinfo}" > + : "${TEXI2DVI:=${makeinfo_git}/texi2dvi}" > + : "${TEXI2PDF:=${makeinfo_git}/texi2pdf}" > > ? I don't think we use these elsewhere. Do they serve a purpose or can we > omit them and keep things simpler? (answering both the questions) This := operator is a handy "default assign" operator. It's a bit of an oddity of the POSIX shell, but it works well. The line: : "${foo:=bar}" is a convenient way of spelling "if foo is unset or null, set it to bar". the initial ':' there serves to discard the result of this evaluation (so that only its side effect of updating foo if necessary is kept) ... so, the above block translates into "if makeinfo_git/makeinfo exists, then default MAKEINFO, TEXI2DVI, TEXI2PDF to makeinfo_git/$tool, otherwise, default them to $tool", where $tool is the respective tool for those variables. > > Please let me know, and I'll see to get this (or probably an updated > patch) in place on gcc.gnu.org. > > Thanks, > Gerald
Hi Arsen, On Fri, 14 Apr 2023, Arsen Arsenović wrote: >> Did you intentionally not implement the following part of my suggestion >> >> if [ x${MAKEINFO}x = xx ]; then >> : > > that is, allowing to override from the command-line (or crontab)? > (answering both the questions) > > This := operator is a handy "default assign" operator. It's a bit of an > oddity of the POSIX shell, but it works well. The line: > > : "${foo:=bar}" > > is a convenient way of spelling "if foo is unset or null, set it to > bar". the initial ':' there serves to discard the result of this > evaluation (so that only its side effect of updating foo if necessary is > kept) I understand, just am wondering whether and why the : is required? I don't think we are using this construct anywhere else? (I was aware of the ${foo:=bar} syntax, just caught up by you pushing that part of the logic to the lowest level whereas I had it at the top level. That's purely on me.) Please go ahead and push this (or a variant without the : commands) and I'll then pick it up from there. Gerald
Gerald Pfeifer <gerald@pfeifer.com> writes: > Hi Arsen, > > On Fri, 14 Apr 2023, Arsen Arsenović wrote: >>> Did you intentionally not implement the following part of my suggestion >>> >>> if [ x${MAKEINFO}x = xx ]; then >>> : >> > that is, allowing to override from the command-line (or crontab)? >> (answering both the questions) >> >> This := operator is a handy "default assign" operator. It's a bit of an >> oddity of the POSIX shell, but it works well. The line: >> >> : "${foo:=bar}" >> >> is a convenient way of spelling "if foo is unset or null, set it to >> bar". the initial ':' there serves to discard the result of this >> evaluation (so that only its side effect of updating foo if necessary is >> kept) > > I understand, just am wondering whether and why the : is required? I > don't think we are using this construct anywhere else? Without them, this would happen: ~$ "${foo:=foo}" bash: foo: command not found ~ 127 $ unset foo ~$ echo "${foo:=foo}" foo ~$ > (I was aware of the ${foo:=bar} syntax, just caught up by you pushing > that part of the logic to the lowest level whereas I had it at the top > level. That's purely on me.) > > Please go ahead and push this (or a variant without the : commands) and > I'll then pick it up from there. Thank you! Hopefully we get this just in time for 13 :) Pushed.
On Thu, 20 Apr 2023, Arsen Arsenović wrote: >> I understand, just am wondering whether and why the : is required? I >> don't think we are using this construct anywhere else? > Without them, this would happen: > > ~$ "${foo:=foo}" > bash: foo: command not found > ~ 127 $ unset foo > ~$ echo "${foo:=foo}" > foo > ~$ Ah, of course! That's why I tend to use FOO=${FOO-barbar} in such cases - which is a tad more characters. :) > Thank you! Hopefully we get this just in time for 13 :) The release is currently planned for the 26th and the udpated script is now live. I just ran it and things seem to work just fine. Do you spot anything unexpected? Gerald
Gerald Pfeifer <gerald@pfeifer.com> writes: > On Thu, 20 Apr 2023, Arsen Arsenović wrote: >>> I understand, just am wondering whether and why the : is required? I >>> don't think we are using this construct anywhere else? >> Without them, this would happen: >> >> ~$ "${foo:=foo}" >> bash: foo: command not found >> ~ 127 $ unset foo >> ~$ echo "${foo:=foo}" >> foo >> ~$ > > Ah, of course! > > That's why I tend to use FOO=${FOO-barbar} in such cases - which is a tad > more characters. :) > >> Thank you! Hopefully we get this just in time for 13 :) > > The release is currently planned for the 26th and the udpated script is > now live. Perfect \o/ > I just ran it and things seem to work just fine. Do you spot anything > unexpected? Seems perfect, thank you! Have a lovely day! :) > Gerald
diff --git a/maintainer-scripts/update_web_docs_git b/maintainer-scripts/update_web_docs_git index d44ab27c1b7..f9006b1f45b 100755 --- a/maintainer-scripts/update_web_docs_git +++ b/maintainer-scripts/update_web_docs_git @@ -12,7 +12,7 @@ set -e GITROOT=${GITROOT:-"/git/gcc.git"} export GITROOT -PATH=/usr/local/bin:$PATH +PATH=/home/gccadmin/texinfo/install-git/bin:/usr/local/bin:$PATH MANUALS="cpp cppinternals