From: "Arsen Arsenović" <arsen@aarsen.me>
To: Sandra Loosemore <sandra.loosemore@siemens.com>
Cc: Sandra Loosemore <sandra@codesourcery.com>,
gcc-patches@gcc.gnu.org, Gerald Pfeifer <gerald@pfeifer.com>,
Joseph Myers <joseph@codesourcery.com>
Subject: Re: [PATCH v2 1/5] docs: Create Indices appendix
Date: Sat, 11 Mar 2023 13:22:44 +0100 [thread overview]
Message-ID: <86356b1nnh.fsf@aarsen.me> (raw)
In-Reply-To: <1db33a21-4645-1c63-faf2-4048be07c323@siemens.com>
[-- Attachment #1.1: Type: text/plain, Size: 922 bytes --]
Sandra Loosemore <sandra.loosemore@siemens.com> writes:
> On 3/9/23 13:38, Arsen Arsenović wrote:
>> Found the change. HTML got support for CONTENTS_OUTPUT_LOCATION,
>> which defaults to after_top, which ignores the inline location of
>> these elements. Here's a patch:
>> maintainer-scripts/ChangeLog:
>> * update_web_docs_git: Set CONTENTS_OUTPUT_LOCATION=inline in
>> order to put @shortcontents above contents. See
>> 9dd976a4-4e09-d901-b949-6d5037567b9b@codesourcery.com on
>> gcc-patches.
>
> I don't think this is an adequate fix. We mere mortals build the manuals with
> "make html" etc instead of the maintainer scripts for the web site, so we need
> a solution that we can put either in the Makefile or directly in the .texi
> files, that won't blow up for older versions of Texinfo that don't support this
> thing.
>
> -Sandra
OK, changed up a bit, what do you think of this:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: html: Set CONTENTS_OUTPUT_LOCATION=inline if makeinfo --]
[-- Type: text/x-patch, Size: 6021 bytes --]
From 5f9084fa0db49cb550bc147e7a563c31a311be1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
Date: Thu, 9 Mar 2023 21:44:29 +0100
Subject: [PATCH] html: Set CONTENTS_OUTPUT_LOCATION=inline if makeinfo
supports it
maintainer-scripts/ChangeLog:
* update_web_docs_git: Set CONTENTS_OUTPUT_LOCATION=inline in
order to put @shortcontents above contents. See
9dd976a4-4e09-d901-b949-6d5037567b9b@codesourcery.com on
gcc-patches.
gcc/ChangeLog:
* configure.ac: Add check for the Texinfo 6.8
CONTENTS_OUTPUT_LOCATION customization variable and set it if
supported.
* configure: Regenerate.
* Makefile.in (MAKEINFO_TOC_INLINE_FLAG): New variable. Set by
configure.ac to -c CONTENTS_OUTPUT_LOCATION=inline if
CONTENTS_OUTPUT_LOCATION support is detected, empty otherwise.
($(build_htmldir)/%/index.html): Pass MAKEINFO_TOC_INLINE_FLAG.
See 9dd976a4-4e09-d901-b949-6d5037567b9b@codesourcery.com on
gcc-patches.
---
gcc/Makefile.in | 6 ++++-
gcc/configure | 32 ++++++++++++++++++++++++--
gcc/configure.ac | 18 +++++++++++++++
maintainer-scripts/update_web_docs_git | 2 +-
4 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 6001c9e3b55..d8b76d83d68 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -787,6 +787,9 @@ INSTALL_HEADERS=install-headers install-mkheaders
# Control whether Info documentation is built and installed.
BUILD_INFO = @BUILD_INFO@
+# Control flags for @contents placement in HTML output
+MAKEINFO_TOC_INLINE_FLAG = @MAKEINFO_TOC_INLINE_FLAG@
+
# Control whether manpages generated by texi2pod.pl can be rebuilt.
GENERATED_MANPAGES = @GENERATED_MANPAGES@
@@ -3461,7 +3464,8 @@ html:: $(HTMLS_BUILD)
$(build_htmldir)/%/index.html: %.texi
$(mkinstalldirs) $(@D)
rm -f $(@D)/*
- $(TEXI2HTML) -I $(abs_docdir) -I $(abs_docdir)/include -o $(@D) $<
+ $(TEXI2HTML) $(MAKEINFO_TOC_INLINE_FLAG) \
+ -I $(abs_docdir) -I $(abs_docdir)/include -o $(@D) $<
# Duplicate entry to handle renaming of gccinstall
$(build_htmldir)/gccinstall/index.html: $(TEXI_GCCINSTALL_FILES)
diff --git a/gcc/configure b/gcc/configure
index 254f9b6c943..98356fdf92d 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -810,6 +810,7 @@ PYTHON
BISON
FLEX
GENERATED_MANPAGES
+MAKEINFO_TOC_INLINE_FLAG
BUILD_INFO
MAKEINFO
have_mktemp_command
@@ -8795,6 +8796,33 @@ else
fi
+MAKEINFO_TOC_INLINE_FLAG=
+if test x"$MAKEINFO" != x; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CONTENTS_OUTPUT_LOCATION support in $MAKEINFO" >&5
+$as_echo_n "checking for CONTENTS_OUTPUT_LOCATION support in $MAKEINFO... " >&6; }
+if ${gcc_cv_texi_add_toc_inline_flags+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ # Detect the unknown variable CONTENTS_OUTPUT_LOCATION warning
+ if "$MAKEINFO" -c CONTENTS_OUTPUT_LOCATION=inline </dev/null 2>&1 \
+ | grep CONTENTS_OUTPUT_LOCATION >/dev/null; then
+ gcc_cv_texi_add_toc_inline_flags=no
+ else
+ gcc_cv_texi_add_toc_inline_flags=yes
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_texi_add_toc_inline_flags" >&5
+$as_echo "$gcc_cv_texi_add_toc_inline_flags" >&6; }
+ if test x"$gcc_cv_texi_add_toc_inline_flags" = xyes; then
+ MAKEINFO_TOC_INLINE_FLAG='-c CONTENTS_OUTPUT_LOCATION=inline'
+ fi
+
+fi
+
+
# Is pod2man recent enough to regenerate manpages?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent Pod::Man" >&5
$as_echo_n "checking for recent Pod::Man... " >&6; }
@@ -19792,7 +19820,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19795 "configure"
+#line 19823 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -19898,7 +19926,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19901 "configure"
+#line 19929 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 62bc908b991..1a7c9c66457 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1242,6 +1242,24 @@ else
fi
AC_SUBST(BUILD_INFO)
+MAKEINFO_TOC_INLINE_FLAG=
+AS_IF([test x"$MAKEINFO" != x], [
+ AC_CACHE_CHECK([for CONTENTS_OUTPUT_LOCATION support in $MAKEINFO],
+ [gcc_cv_texi_add_toc_inline_flags], [
+ # Detect the unknown variable CONTENTS_OUTPUT_LOCATION warning
+ if "$MAKEINFO" -c CONTENTS_OUTPUT_LOCATION=inline </dev/null 2>&1 \
+ | grep CONTENTS_OUTPUT_LOCATION >/dev/null; then
+ gcc_cv_texi_add_toc_inline_flags=no
+ else
+ gcc_cv_texi_add_toc_inline_flags=yes
+ fi
+ ])
+ if test x"$gcc_cv_texi_add_toc_inline_flags" = xyes; then
+ MAKEINFO_TOC_INLINE_FLAG='-c CONTENTS_OUTPUT_LOCATION=inline'
+ fi
+])
+AC_SUBST([MAKEINFO_TOC_INLINE_FLAG])
+
# Is pod2man recent enough to regenerate manpages?
AC_MSG_CHECKING([for recent Pod::Man])
if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
diff --git a/maintainer-scripts/update_web_docs_git b/maintainer-scripts/update_web_docs_git
index 9ded1744df4..c9f14d1a4d1 100755
--- a/maintainer-scripts/update_web_docs_git
+++ b/maintainer-scripts/update_web_docs_git
@@ -169,7 +169,7 @@ for file in $MANUALS; do
if [ "$file" = "gnat_ugn" ]; then
includes="$includes -I gcc/gcc/ada -I gcc/gcc/ada/doc/gnat_ugn"
fi
- makeinfo --html --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
--
2.39.2
[-- Attachment #1.3: Type: text/plain, Size: 84 bytes --]
I tested with a fresh build of texinfo 7.0-dev and 6.0.
--
Arsen Arsenović
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 381 bytes --]
next prev parent reply other threads:[~2023-03-11 12:24 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 10:27 [PATCH v2 0/5] A small Texinfo refinement Arsen Arsenović
2023-02-23 10:27 ` [PATCH v2 1/5] docs: Create Indices appendix Arsen Arsenović
2023-03-09 3:16 ` Sandra Loosemore
2023-03-09 10:12 ` Arsen Arsenović
2023-03-09 20:38 ` Arsen Arsenović
2023-03-11 1:12 ` Sandra Loosemore
2023-03-11 1:34 ` Arsen Arsenović
2023-03-11 12:22 ` Arsen Arsenović [this message]
2023-03-11 19:22 ` Gerald Pfeifer
2023-03-11 20:22 ` Arsen Arsenović
2023-03-11 19:34 ` Sandra Loosemore
2023-03-11 20:14 ` Arsen Arsenović
2023-03-11 20:32 ` [PATCH v2] html: Set CONTENTS_OUTPUT_LOCATION=inline if makeinfo supports it Arsen Arsenović
2023-03-12 10:25 ` [PATCH v2 1/5] docs: Create Indices appendix Gerald Pfeifer
2023-03-12 12:23 ` Arsen Arsenović
2023-02-23 10:27 ` [PATCH v2 2/5] **/*.texi: Reorder index entries Arsen Arsenović
2023-02-23 23:50 ` Gerald Pfeifer
2023-02-23 10:27 ` [PATCH v2 3/5] doc: Add @defbuiltin family of helpers, set documentlanguage Arsen Arsenović
2023-03-09 23:50 ` Sandra Loosemore
2023-02-23 10:27 ` [PATCH v2 4/5] Update texinfo.tex, remove the @gol macro/alias Arsen Arsenović
2023-03-09 23:55 ` Sandra Loosemore
2023-03-10 0:17 ` Gerald Pfeifer
2023-03-10 10:33 ` Thomas Schwinge
2023-03-10 12:49 ` Arsen Arsenović
2023-03-10 15:51 ` Gerald Pfeifer
2023-03-10 15:58 ` Arsen Arsenović
2023-03-10 12:48 ` Arsen Arsenović
2023-03-10 15:49 ` Arsen Arsenović
2023-03-18 20:14 ` Ping (gcc/configure.ac, docs): " Arsen Arsenović
2023-03-20 22:01 ` Sandra Loosemore
2023-03-20 23:06 ` Joseph Myers
2023-03-20 23:27 ` Arsen Arsenović
2023-03-20 23:35 ` Arsen Arsenović
2023-03-21 9:52 ` Arsen Arsenović
2023-03-21 23:11 ` Gerald Pfeifer
2023-02-23 10:27 ` [PATCH v2 5/5] update_web_docs_git: Update CSS reference to new manual CSS Arsen Arsenović
2023-03-10 0:07 ` Sandra Loosemore
2023-03-10 13:00 ` Arsen Arsenović
2023-02-25 22:04 ` [PATCH v2 0/5] A small Texinfo refinement Thomas Schwinge
2023-02-26 14:54 ` Arsen Arsenović
2023-03-08 1:56 ` Sandra Loosemore
2023-03-08 9:11 ` Arsen Arsenović
2023-03-08 18:38 ` Sandra Loosemore
2023-03-08 21:22 ` Arsen Arsenović
2023-03-09 1:09 ` Sandra Loosemore
2023-03-09 1:19 ` Andrew Pinski
2023-03-09 8:26 ` Richard Biener
2023-03-09 23:35 ` Sandra Loosemore
2023-03-10 8:50 ` Iain Sandoe
2023-03-10 17:51 ` Sandra Loosemore
2023-03-10 18:09 ` Sandra Loosemore
2023-03-10 19:00 ` Gerald Pfeifer
2023-03-13 9:05 ` Richard Biener
2023-03-13 11:01 ` Arsen Arsenović
2023-05-29 15:06 ` NightStrike
2023-05-29 17:26 ` Arsen Arsenović
2023-05-29 19:27 ` Sandra Loosemore
2023-03-09 10:22 ` Arsen Arsenović
2023-03-09 8:28 ` 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=86356b1nnh.fsf@aarsen.me \
--to=arsen@aarsen.me \
--cc=gcc-patches@gcc.gnu.org \
--cc=gerald@pfeifer.com \
--cc=joseph@codesourcery.com \
--cc=sandra.loosemore@siemens.com \
--cc=sandra@codesourcery.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).