octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8


From: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #62648] build problem with texinfo>6.8
Date: Fri, 11 Nov 2022 08:31:19 -0500 (EST)

Follow-up Comment #9, bug #62648 (project octave):

The intent here in the diff below is to try the 6.8 patterns, and if they
fail, then we retry with the 7.0 patterns. It is still buggy but that's the
intent so far.

If there's a way to get the Texinfo version inside the Perl script itself we
could try changing that.


diff -r 870036573716 doc/interpreter/mk-qthelp.pl
--- a/doc/interpreter/mk-qthelp.pl      Mon Nov 07 16:50:39 2022 -0500
+++ b/doc/interpreter/mk-qthelp.pl      Fri Nov 11 08:27:59 2022 -0500
@@ -26,8 +26,18 @@ if ($#ARGV != 1)
 open (my $HTML, "<", $htmlfname) or die "Unable to open $htmlfname";
 
 # Skip through preamble of file to find start of list
-while (($_ = <$HTML>) !~ /^<div class="contents">/ ) {;}
-while (($_ = <$HTML>) !~ /^<ul class="no-bullet">/ ) {;}
+$_ = <$HTML>;
+while (defined($_) && (!eof($_)) && ($_ !~ /^<div class="contents">/ )) {;}
+$_ = <$HTML>;
+while (defined($_) && (!eof($_)) && ($_ !~ /^<ul class="no-bullet">/ )) {;}
+
+if (eof($_))  # Texinfo is now 7+, need to search for a different first
pattern
+{
+  $_ = <$HTML>;
+  while (defined($_) && (!eof($_)) && ($_ !~ /^<ul
class="toc-numbered-mark">/ )) {;}
+  $_ = <$HTML>;
+  while (defined($_) && (!eof($_)) && ($_ !~ /^<ul class="no-bullet">/ ))
{;}
+}
 
 $level = 0;
 while (<$HTML>)
@@ -68,7 +78,13 @@ die "Failed to parse index.html" if ($le
 open ($HTML, "<", $htmlfname) or die "Unable to open $htmlfname";
 
 # Skip through preamble of file to find start of list
-while (($_ = <$HTML>) !~ /^<table class="index-fn/ ) {;}
+$_ = <$HTML>;
+while (defined($_) && (!eof($_)) && ($_ !~ /^<table class="index-fn/ )) {;}
+if (eof($_))  # Texinfo is now 7+, need to search for a different first
pattern
+{
+  $_ = <$HTML>;
+  while (defined($_) && (!eof($_)) && ($_ !~ /^<table class="fn-entries/ ))
{;}
+}
 
 while (<$HTML>)
 {




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62648>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]