[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/33] texi2pod: parse @include directives outside "@c man" blocks
From: |
Peter Maydell |
Subject: |
[PULL 03/33] texi2pod: parse @include directives outside "@c man" blocks |
Date: |
Fri, 6 Mar 2020 11:09:29 +0000 |
From: Paolo Bonzini <address@hidden>
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 <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Tested-by: Alex Bennée <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Message-id: address@hidden
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
---
scripts/texi2pod.pl | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/scripts/texi2pod.pl b/scripts/texi2pod.pl
index 839b7917cf7..8bfc6f6f4c4 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+(.+)$/
--
2.20.1
- [PULL 00/33] docs queue, Peter Maydell, 2020/03/06
- [PULL 02/33] qemu-doc: remove target OS documentation, Peter Maydell, 2020/03/06
- [PULL 03/33] texi2pod: parse @include directives outside "@c man" blocks,
Peter Maydell <=
- [PULL 01/33] qemu-doc: convert user-mode emulation to a separate Sphinx manual, Peter Maydell, 2020/03/06
- [PULL 04/33] qemu-doc: split CPU models doc between MIPS and x86 parts, Peter Maydell, 2020/03/06
- [PULL 07/33] qemu-doc: move system requirements chapter inside PC section, Peter Maydell, 2020/03/06
- [PULL 06/33] qemu-doc: extract common system emulator documentation from the PC section, Peter Maydell, 2020/03/06
- [PULL 09/33] qemu-doc: Remove the "CPU emulation" part of the "Implementation notes", Peter Maydell, 2020/03/06
- [PULL 10/33] qemu-doc: move qemu-tech.texi into main section, Peter Maydell, 2020/03/06
- [PULL 11/33] qemu-doc: move included files to docs/system, Peter Maydell, 2020/03/06
- [PULL 12/33] qemu-doc: remove indices other than findex, Peter Maydell, 2020/03/06
- [PULL 14/33] docs: Create defs.rst.inc as a place to define substitutions, Peter Maydell, 2020/03/06
- [PULL 17/33] docs/system: convert managed startup to rST., Peter Maydell, 2020/03/06