From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 318BD385781C; Fri, 28 Oct 2022 10:35:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 318BD385781C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666953359; bh=BZFYAvIMzBKvVtZPYyBhMlaA7qooyjvp5kRsw8gdsD8=; h=From:To:Subject:Date:From; b=IQMdPgea2GiCDpepTwDkaqJ3WbzQFR1JOW0/QSovf5DIpL/UQrEfWmGcBjNXsgstL k5rdVi6BeYiUqrDoXUBi5uo0UU+ArhWmemuGOAcjNJkSCX3d0bPVatt+ip1Jnt7K94 bOKOqm+V6KGQ+hN4qh216YQnvY0c5xc6H4inGaSg= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jon TURNEY To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Fix warning during manpage generaton X-Act-Checkin: newlib-cygwin X-Git-Author: Jon Turney X-Git-Refname: refs/heads/master X-Git-Oldrev: 1fc30147282ab0d3dc8bc742082d4745e5ffe352 X-Git-Newrev: 85148c43c4e502364ee34c14ec265f1a275ce20e Message-Id: <20221028103559.318BD385781C@sourceware.org> Date: Fri, 28 Oct 2022 10:35:59 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D85148c43c4e= 502364ee34c14ec265f1a275ce20e commit 85148c43c4e502364ee34c14ec265f1a275ce20e Author: Jon Turney Date: Thu Oct 27 22:51:28 2022 +0100 Fix warning during manpage generaton =20 > ERROR: xref linking to Stubs has no generated link text. > Error: no ID for constraint linkend: Stubs. =20 (Despite saying "ERROR", this is actually a warning, and manpages are still generated) =20 Improve chapter-texi2docbook so it generates elements for texinfo sections as well, so that a cross-reference to the "Stubs" section contains a valid element ID. Diff: --- newlib/doc/chapter-texi2docbook.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/newlib/doc/chapter-texi2docbook.py b/newlib/doc/chapter-texi2d= ocbook.py index 834a14e7c..70ab3c04f 100755 --- a/newlib/doc/chapter-texi2docbook.py +++ b/newlib/doc/chapter-texi2docbook.py @@ -14,6 +14,7 @@ import re =20 def main(): first_node =3D True + prev_sect =3D False =20 print ('') print ('') @@ -27,18 +28,27 @@ def main(): if l.startswith("@node"): l =3D l.replace("@node", "", 1) l =3D l.strip() - l =3D l.lower() if first_node: - print ('' % l.replace(' ', '_')) + print ('' % l.lower().replace(' ', '_')) first_node =3D False + else: + if prev_sect: + print ('') + print ('
' % l) + prev_sect =3D True elif l.startswith("@chapter "): l =3D l.replace("@chapter ", "", 1) print ('%s' % l) + elif l.startswith("@section "): + l =3D l.replace("@section ", "", 1) + print ('%s' % l) elif l.startswith("@include "): l =3D l.replace("@include ", "", 1) l =3D l.replace(".def", ".xml", 1) print ('' % l.strip()) =20 + if prev_sect: + print ('
') print ('
') =20 if __name__ =3D=3D "__main__" :