From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050:0:465::101]) by sourceware.org (Postfix) with ESMTPS id 7DDF63858D28 for ; Sat, 11 Mar 2023 12:24:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7DDF63858D28 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (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-101.mailbox.org (Postfix) with ESMTPS id 4PYhts0b7Dz9sTQ; Sat, 11 Mar 2023 13:24:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1678537477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rl3ZOFGHNi1KBj2tEtVGZmjSJyuLsii7XbsJj26lu2w=; b=J+QEL9NwoUPlywPpo6cxD/eZk5VpDPJ/+LxOhAypCv95k7sPsOytg5OJ8gYjScUJG3fw2b Yjvk0dOQ0VyCN5vvZZaZ6OEU0dKGsH40Y3xRbBiUUulK8e6cN4RkNzc0c6uj0twnpUrAW9 8dU0biqThOP0SFw5xL/75s/fL6WPkfNGPbK7/cghJZuccqIMZoOxdnmkdTy5CRDYFZEZPR cRzZw3a/AlYhld7oY/oS/WgvvispFf7MHytvm6L9h4sUdhtSRWzHJDSAL57r7pTgZ5z1n9 abjWzz86/a/ifj1JaUe91G6GikJe+wlBKcxCJvf1oNEAWcDHWx/uMz5IcQPi7A== References: <20230223102714.3606058-1-arsen@aarsen.me> <20230223102714.3606058-2-arsen@aarsen.me> <9dd976a4-4e09-d901-b949-6d5037567b9b@codesourcery.com> <86sfed63l6.fsf@aarsen.me> <1db33a21-4645-1c63-faf2-4048be07c323@siemens.com> From: Arsen =?utf-8?Q?Arsenovi=C4=87?= To: Sandra Loosemore Cc: Sandra Loosemore , gcc-patches@gcc.gnu.org, Gerald Pfeifer , Joseph Myers Subject: Re: [PATCH v2 1/5] docs: Create Indices appendix Date: Sat, 11 Mar 2023 13:22:44 +0100 In-reply-to: <1db33a21-4645-1c63-faf2-4048be07c323@siemens.com> Message-ID: <86356b1nnh.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Rspamd-Queue-Id: 4PYhts0b7Dz9sTQ 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 List-Id: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sandra Loosemore writes: > On 3/9/23 13:38, Arsen Arsenovi=C4=87 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=3Dinline 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 suppor= t this > thing. > > -Sandra OK, changed up a bit, what do you think of this: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-html-Set-CONTENTS_OUTPUT_LOCATION-inline-if-makeinfo.patch Content-Transfer-Encoding: quoted-printable Content-Description: html: Set CONTENTS_OUTPUT_LOCATION=inline if makeinfo From=205f9084fa0db49cb550bc147e7a563c31a311be1d Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Arsen=3D20Arsenovi=3DC4=3D87?=3D Date: Thu, 9 Mar 2023 21:44:29 +0100 Subject: [PATCH] html: Set CONTENTS_OUTPUT_LOCATION=3Dinline if makeinfo supports it maintainer-scripts/ChangeLog: * update_web_docs_git: Set CONTENTS_OUTPUT_LOCATION=3Dinline 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=3Dinline 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. =2D-- 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 =2D-- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -787,6 +787,9 @@ INSTALL_HEADERS=3Dinstall-headers install-mkheaders # Control whether Info documentation is built and installed. BUILD_INFO =3D @BUILD_INFO@ =20 +# Control flags for @contents placement in HTML output +MAKEINFO_TOC_INLINE_FLAG =3D @MAKEINFO_TOC_INLINE_FLAG@ + # Control whether manpages generated by texi2pod.pl can be rebuilt. GENERATED_MANPAGES =3D @GENERATED_MANPAGES@ =20 @@ -3461,7 +3464,8 @@ html:: $(HTMLS_BUILD) $(build_htmldir)/%/index.html: %.texi $(mkinstalldirs) $(@D) rm -f $(@D)/* =2D $(TEXI2HTML) -I $(abs_docdir) -I $(abs_docdir)/include -o $(@D) $< + $(TEXI2HTML) $(MAKEINFO_TOC_INLINE_FLAG) \ + -I $(abs_docdir) -I $(abs_docdir)/include -o $(@D) $< =20 # 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 =2D-- 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 =20 =20 +MAKEINFO_TOC_INLINE_FLAG=3D +if test x"$MAKEINFO" !=3D x; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CONTENTS_OUTPUT_LO= CATION 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=3Dinline &1 \ + | grep CONTENTS_OUTPUT_LOCATION >/dev/null; then + gcc_cv_texi_add_toc_inline_flags=3Dno + else + gcc_cv_texi_add_toc_inline_flags=3Dyes + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_texi_add_toc_inli= ne_flags" >&5 +$as_echo "$gcc_cv_texi_add_toc_inline_flags" >&6; } + if test x"$gcc_cv_texi_add_toc_inline_flags" =3D xyes; then + MAKEINFO_TOC_INLINE_FLAG=3D'-c CONTENTS_OUTPUT_LOCATION=3Dinline' + 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=3D0; lt_dlno_uscore=3D1; lt_dlneed_uscore=3D2 lt_status=3D$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF =2D#line 19795 "configure" +#line 19823 "configure" #include "confdefs.h" =20 #if HAVE_DLFCN_H @@ -19898,7 +19926,7 @@ else lt_dlunknown=3D0; lt_dlno_uscore=3D1; lt_dlneed_uscore=3D2 lt_status=3D$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF =2D#line 19901 "configure" +#line 19929 "configure" #include "confdefs.h" =20 #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index 62bc908b991..1a7c9c66457 100644 =2D-- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1242,6 +1242,24 @@ else fi AC_SUBST(BUILD_INFO) =20 +MAKEINFO_TOC_INLINE_FLAG=3D +AS_IF([test x"$MAKEINFO" !=3D 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=3Dinline &1 \ + | grep CONTENTS_OUTPUT_LOCATION >/dev/null; then + gcc_cv_texi_add_toc_inline_flags=3Dno + else + gcc_cv_texi_add_toc_inline_flags=3Dyes + fi + ]) + if test x"$gcc_cv_texi_add_toc_inline_flags" =3D xyes; then + MAKEINFO_TOC_INLINE_FLAG=3D'-c CONTENTS_OUTPUT_LOCATION=3Dinline' + 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/up= date_web_docs_git index 9ded1744df4..c9f14d1a4d1 100755 =2D-- 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" =3D "gnat_ugn" ]; then includes=3D"$includes -I gcc/gcc/ada -I gcc/gcc/ada/doc/gnat_ugn" fi =2D makeinfo --html --css-ref $CSS $includes -o ${file} ${filename} + makeinfo --html -c CONTENTS_OUTPUT_LOCATION=3Dinline --css-ref $CSS $i= ncludes -o ${file} ${filename} tar cf ${file}-html.tar ${file}/*.html texi2dvi $includes -o ${file}.dvi ${filename} /dev/null &&= dvips -o ${file}.ps ${file}.dvi texi2pdf $includes -o ${file}.pdf ${filename}