All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH 03/18] texi2pod: parse @include directives outside "@c man" blocks
Date: Thu, 27 Feb 2020 11:13:13 +0000	[thread overview]
Message-ID: <CAFEAcA_D_XhGUtZkFg44sU5hd_VYa3K9GHXGyh7PgV=8j9=XEg@mail.gmail.com> (raw)
In-Reply-To: <20200226113034.6741-4-pbonzini@redhat.com>

On Wed, 26 Feb 2020 at 11:30, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> 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>
> ---
>  scripts/texi2pod.pl | 36 ++++++++++++++++++------------------
>  1 file 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/>/&GT;/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+(.+)$/

This changes the semantics subtly -- we now honour @include
even if it's found inside an @ignore..@end ignore comment
block, for instance. But as you say this script isn't going
to be around much longer, so we can just avoid doing that
sort of thing.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


  reply	other threads:[~2020-02-27 11:14 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26 11:30 [PATCH v2 00/18] qemu-doc reorganization and Sphinx version Paolo Bonzini
2020-02-26 11:30 ` [PATCH 01/18] qemu-doc: convert user-mode emulation to a separate Sphinx manual Paolo Bonzini
2020-02-27 11:07   ` Peter Maydell
2020-02-27 13:08     ` Paolo Bonzini
2020-02-26 11:30 ` [PATCH 02/18] qemu-doc: remove target OS documentation Paolo Bonzini
2020-02-26 11:30 ` [PATCH 03/18] texi2pod: parse @include directives outside "@c man" blocks Paolo Bonzini
2020-02-27 11:13   ` Peter Maydell [this message]
2020-02-26 11:30 ` [PATCH 04/18] qemu-doc: split CPU models doc between MIPS and x86 parts Paolo Bonzini
2020-02-27 11:29   ` Peter Maydell
2020-02-26 11:30 ` [PATCH 05/18] qemu-doc: split qemu-doc.texi in multiple files Paolo Bonzini
2020-02-27 11:38   ` Peter Maydell
2020-02-27 13:09     ` Paolo Bonzini
2020-02-26 11:30 ` [PATCH 06/18] qemu-doc: extract common system emulator documentation from the PC section Paolo Bonzini
2020-02-27 11:41   ` Peter Maydell
2020-02-26 11:30 ` [PATCH 07/18] qemu-doc: move system requirements chapter inside " Paolo Bonzini
2020-02-27 11:42   ` Peter Maydell
2020-02-26 11:30 ` [PATCH 08/18] qemu-doc: split target sections to separate files Paolo Bonzini
2020-02-27 11:45   ` Peter Maydell
2020-02-26 11:30 ` [PATCH 09/18] qemu-doc: Remove the "CPU emulation" part of the "Implementation notes" Paolo Bonzini
2020-02-26 11:30 ` [PATCH 10/18] qemu-doc: move qemu-tech.texi into main section Paolo Bonzini
2020-02-27 11:47   ` Peter Maydell
2020-02-26 11:30 ` [PATCH 11/18] qemu-doc: move included files to docs/system Paolo Bonzini
2020-02-27 11:50   ` Peter Maydell
2020-02-26 11:30 ` [PATCH 12/18] qemu-doc: remove indices other than findex Paolo Bonzini
2020-02-27 11:50   ` Peter Maydell
2020-02-26 11:30 ` [PATCH 13/18] docs/system: put qemu-block-drivers body in an included file Paolo Bonzini
2020-02-27 11:58   ` Peter Maydell
2020-02-27 13:14     ` Paolo Bonzini
2020-02-27 13:28     ` Daniel P. Berrangé
2020-02-26 11:30 ` [PATCH 14/18] docs/system: Convert qemu-cpu-models.texi to rST Paolo Bonzini
2020-02-27 12:10   ` Peter Maydell
2020-02-27 12:37     ` Kashyap Chamarthy
2020-02-27 14:19       ` Kashyap Chamarthy
2020-02-27 13:16     ` Paolo Bonzini
2020-02-27 14:01   ` Peter Maydell
2020-02-27 14:54     ` Paolo Bonzini
2020-02-26 11:30 ` [PATCH 15/18] docs/system: Convert security.texi to rST format Paolo Bonzini
2020-02-26 11:30 ` [PATCH 16/18] docs/system: convert managed startup to rST Paolo Bonzini
2020-02-26 11:30 ` [PATCH 17/18] docs/system: convert the documentation of deprecated features " Paolo Bonzini
2020-02-26 11:30 ` [PATCH 18/18] docs/system: convert Texinfo documentation " Paolo Bonzini
2020-02-27 12:26   ` Peter Maydell
2020-02-27 13:18     ` Paolo Bonzini
2020-02-27 15:04   ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFEAcA_D_XhGUtZkFg44sU5hd_VYa3K9GHXGyh7PgV=8j9=XEg@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.