From: "罗勇刚(Yonggang Luo)" <luoyonggang@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2 1/4] docs: Fixes build docs on msys2/mingw
Date: Fri, 16 Oct 2020 05:33:08 +0800 [thread overview]
Message-ID: <CAE2XoE8MJao1qOKazsKbFTMcTejFOnjV4z2WHxH_f2OUB1=hfw@mail.gmail.com> (raw)
In-Reply-To: <CABgObfaA_zv-GWiM0fR=adRZ0wcMN=nEnNmL5Q32WkLFOZ7vMA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3520 bytes --]
It's tests, running by make
On Fri, Oct 16, 2020 at 5:23 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>
>
> Il gio 15 ott 2020, 22:30 Peter Maydell <peter.maydell@linaro.org> ha
scritto:
>>
>> On Thu, 15 Oct 2020 at 21:13, Yonggang Luo <luoyonggang@gmail.com> wrote:
>> >
>> > Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
>> > ---
>> > docs/conf.py | 2 +-
>> > docs/sphinx/kerneldoc.py | 2 +-
>> > scripts/rst-sanitize.py | 21 +++++++++++++++++++++
>> > tests/qapi-schema/meson.build | 5 +++--
>> > 4 files changed, 26 insertions(+), 4 deletions(-)
>> > create mode 100644 scripts/rst-sanitize.py
>> >
>> > diff --git a/scripts/rst-sanitize.py b/scripts/rst-sanitize.py
>> > new file mode 100644
>> > index 0000000000..26060f1208
>> > --- /dev/null
>> > +++ b/scripts/rst-sanitize.py
>> > @@ -0,0 +1,21 @@
>> > +#!/usr/bin/env python3
>> > +
>> > +#
>> > +# Script for remove cr line ending in file
>> > +#
>> > +# Authors:
>> > +# Yonggang Luo <luoyonggang@gmail.com>
>> > +#
>> > +# This work is licensed under the terms of the GNU GPL, version 2
>> > +# or, at your option, any later version. See the COPYING file in
>> > +# the top-level directory.
>> > +
>> > +import sys
>> > +
>> > +def main(_program, file, *unused):
>> > + with open(file, 'rb') as content_file:
>> > + content = content_file.read()
>> > + sys.stdout.buffer.write(content.replace(b'\r', b''))
>> > +
>> > +if __name__ == "__main__":
>> > + main(*sys.argv)
>>
>> Why doesn't the perl rune work? Your commit message doesn't say.
>
>
> Ninjatool gets confused by Windows escapes. So it's a QEMU-ism and
switching to ninja fixes it. There's no need to use a separate script for
this.
>
> Paolo
>
>>
>> > diff --git a/tests/qapi-schema/meson.build
b/tests/qapi-schema/meson.build
>> > index 1f222a7a13..20a7641af8 100644
>> > --- a/tests/qapi-schema/meson.build
>> > +++ b/tests/qapi-schema/meson.build
>> > @@ -251,18 +251,19 @@ qapi_doc_out = custom_target('QAPI rST doc',
>> > # using an explicit '\' character in the command arguments to
>> > # a custom_target(), as Meson will unhelpfully replace it with a '/'
>> > # (https://github.com/mesonbuild/meson/issues/1564)
>> > +rst_sanitize_cmd = [find_program('../../scripts/rst-sanitize.py'),
'@INPUT@']
>> > qapi_doc_out_nocr = custom_target('QAPI rST doc newline-sanitized',
>> > output: ['doc-good.txt.nocr'],
>> > input: qapi_doc_out[0],
>> > build_by_default: build_docs,
>> > - command: ['perl', '-pe', '$x = chr
13; s/$x$//', '@INPUT@'],
>> > + command: rst_sanitize_cmd,
>> > capture: true)
>> >
>> > qapi_doc_ref_nocr = custom_target('QAPI rST doc reference
newline-sanitized',
>> > output: ['doc-good.ref.nocr'],
>> > input: files('doc-good.txt'),
>> > build_by_default: build_docs,
>> > - command: ['perl', '-pe', '$x = chr
13; s/$x$//', '@INPUT@'],
>> > + command: rst_sanitize_cmd,
>> > capture: true)
>>
>> thanks
>> -- PMM
>>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
[-- Attachment #2: Type: text/html, Size: 5116 bytes --]
next prev parent reply other threads:[~2020-10-15 21:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 20:10 [PATCH v2 0/4] Fixes docs building on msys2/mingw Yonggang Luo
2020-10-15 20:10 ` [PATCH v2 1/4] docs: Fixes build docs " Yonggang Luo
2020-10-15 20:30 ` Peter Maydell
2020-10-15 20:38 ` 罗勇刚(Yonggang Luo)
2020-10-15 21:22 ` Paolo Bonzini
2020-10-15 21:33 ` 罗勇刚(Yonggang Luo) [this message]
2020-10-15 20:10 ` [PATCH v2 2/4] configure: the docdir option should passed to meson as is Yonggang Luo
2020-10-15 21:23 ` Paolo Bonzini
2020-10-15 21:39 ` 罗勇刚(Yonggang Luo)
2020-10-15 20:10 ` [PATCH v2 3/4] meson: Move the detection logic for sphinx to meson Yonggang Luo
2020-10-15 20:10 ` [PATCH v2 4/4] cirrus: Enable doc build on msys2/mingw Yonggang Luo
2020-10-15 21:52 ` [PATCH v2 0/4] Fixes docs building " Paolo Bonzini
2020-10-15 21:55 ` 罗勇刚(Yonggang Luo)
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='CAE2XoE8MJao1qOKazsKbFTMcTejFOnjV4z2WHxH_f2OUB1=hfw@mail.gmail.com' \
--to=luoyonggang@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).