From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sa-prd-fep-047.btinternet.com (mailomta2-sa.btinternet.com [213.120.69.8]) by sourceware.org (Postfix) with ESMTPS id A8A0B385842A for ; Fri, 28 Oct 2022 08:53:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A8A0B385842A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk Received: from sa-prd-rgout-003.btmx-prd.synchronoss.net ([10.2.38.6]) by sa-prd-fep-047.btinternet.com with ESMTP id <20221028085341.VCD8034.sa-prd-fep-047.btinternet.com@sa-prd-rgout-003.btmx-prd.synchronoss.net>; Fri, 28 Oct 2022 09:53:41 +0100 Authentication-Results: btinternet.com; auth=pass (LOGIN) smtp.auth=jonturney@btinternet.com; bimi=skipped X-SNCR-Rigid: 6139429040B3B19D X-Originating-IP: [86.139.199.187] X-OWM-Source-IP: 86.139.199.187 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvgedrtdeigddtkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedtudenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpeflohhnucfvuhhrnhgvhicuoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqeenucggtffrrghtthgvrhhnpeduueduhfdtgfeghfegveeguedvgefhgffgleegiefgfffgfffgffehvdfhleefjeenucffohhmrghinhepohgrshhishdqohhpvghnrdhorhhgpdiffedrohhrghenucfkphepkeeirddufeelrdduleelrddukeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheplhhotggrlhhhohhsthdrlhhotggrlhguohhmrghinhdpihhnvghtpeekiedrudefledrudelledrudekjedpmhgrihhlfhhrohhmpehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhdprhgtphhtthhopehnvgiflhhisgesshhouhhrtggvfigrrhgvrdhorhhg X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from localhost.localdomain (86.139.199.187) by sa-prd-rgout-003.btmx-prd.synchronoss.net (5.8.716.04) (authenticated as jonturney@btinternet.com) id 6139429040B3B19D; Fri, 28 Oct 2022 09:53:41 +0100 From: Jon Turney To: newlib@sourceware.org Cc: Jon Turney Subject: [PATCH] Fix warning during manpage generaton Date: Fri, 28 Oct 2022 09:53:26 +0100 Message-Id: <20221028085326.11792-1-jon.turney@dronecode.org.uk> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1199.0 required=5.0 tests=BAYES_00,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NONE,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: > ERROR: xref linking to Stubs has no generated link text. > Error: no ID for constraint linkend: Stubs. (Despite saying "ERROR", this is actaully a warning and manpages are still generated) 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. --- 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-texi2docbook.py index 834a14e7c..70ab3c04f 100755 --- a/newlib/doc/chapter-texi2docbook.py +++ b/newlib/doc/chapter-texi2docbook.py @@ -14,6 +14,7 @@ import re def main(): first_node = True + prev_sect = False print ('') print ('') @@ -27,18 +28,27 @@ def main(): if l.startswith("@node"): l = l.replace("@node", "", 1) l = l.strip() - l = l.lower() if first_node: - print ('' % l.replace(' ', '_')) + print ('' % l.lower().replace(' ', '_')) first_node = False + else: + if prev_sect: + print ('') + print ('
' % l) + prev_sect = True elif l.startswith("@chapter "): l = l.replace("@chapter ", "", 1) print ('%s' % l) + elif l.startswith("@section "): + l = l.replace("@section ", "", 1) + print ('%s' % l) elif l.startswith("@include "): l = l.replace("@include ", "", 1) l = l.replace(".def", ".xml", 1) print ('' % l.strip()) + if prev_sect: + print ('
') print ('
') if __name__ == "__main__" : -- 2.38.1