diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2020-02-28 15:35:49 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2020-03-06 10:04:57 +0000 |
| commit | 41955e1b6f99e4db521f99fd27c74705b59f67e0 (patch) | |
| tree | a3b906e76a1fd32bca72aacdbb5a028a57b75339 | |
| parent | a6bd8b0a56f3fdf3c46775b458e3df3c25d0b752 (diff) | |
| download | focaccia-qemu-41955e1b6f99e4db521f99fd27c74705b59f67e0.tar.gz focaccia-qemu-41955e1b6f99e4db521f99fd27c74705b59f67e0.zip | |
texi2pod: parse @include directives outside "@c man" blocks
This enables splitting the huge qemu-doc.texi file and keeping parallel Texinfo and rST versions of the documentation. texi2pod is not going to live much longer and hardly anyone cares about its upstream status, so the temporary fork should be acceptable. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20200228153619.9906-4-peter.maydell@linaro.org Message-id: 20200226113034.6741-4-pbonzini@redhat.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| -rwxr-xr-x | scripts/texi2pod.pl | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/scripts/texi2pod.pl b/scripts/texi2pod.pl index 839b7917cf..8bfc6f6f4c 100755 --- a/scripts/texi2pod.pl +++ b/scripts/texi2pod.pl @@ -143,6 +143,24 @@ while(<$inf>) { next; }; + # Single line command handlers. + + /^\@include\s+(.+)$/ and do { + push @instack, $inf; + $inf = gensym(); + $file = postprocess($1); + + # Try cwd and $ibase, then explicit -I paths. + $done = 0; + foreach $path ("", $ibase, @ipath) { + $mypath = $file; + $mypath = $path . "/" . $mypath if ($path ne ""); + open($inf, "<" . $mypath) and ($done = 1, last); + } + die "cannot find $file" if !$done; + next; + }; + next unless $output; # Discard comments. (Can't do it above, because then we'd never see @@ -242,24 +260,6 @@ while(<$inf>) { s/>/>/g; } - # Single line command handlers. - - /^\@include\s+(.+)$/ and do { - push @instack, $inf; - $inf = gensym(); - $file = postprocess($1); - - # Try cwd and $ibase, then explicit -I paths. - $done = 0; - foreach $path ("", $ibase, @ipath) { - $mypath = $file; - $mypath = $path . "/" . $mypath if ($path ne ""); - open($inf, "<" . $mypath) and ($done = 1, last); - } - die "cannot find $file" if !$done; - next; - }; - /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/ and $_ = "\n=head2 $1\n"; /^\@subsection\s+(.+)$/ |