From: Paolo Bonzini <pbonzini@redhat.com>
To: luoyonggang@gmail.com
Cc: qemu-level <qemu-devel@nongnu.org>
Subject: Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson
Date: Fri, 16 Oct 2020 10:05:22 +0200 [thread overview]
Message-ID: <ff7823a5-0445-c57d-7dfb-b26a26dcde0e@redhat.com> (raw)
In-Reply-To: <4d0c598d-84c4-b760-790b-f2041bf3066e@redhat.com>
On 16/10/20 09:57, Paolo Bonzini wrote:
> On 16/10/20 09:52, 罗勇刚(Yonggang Luo) wrote:
>>
>>> build_docs = false
>>> if sphinx_build.found()
>>> # This is a bit awkward but works: create a trivial document and
>>> # try to run it with our configuration file (which enforces a
>>> # version requirement). This will fail if sphinx-build is too old.
>>> run_command('mkdir', ['-p', tmpdir / 'sphinx'])
>>> run_command('touch', [tmpdir / 'sphinx/index.rst'])
>>> sphinx_build_test_out = run_command(SPHINX_ARGS + [
>>> '-c', meson.current_source_dir() / 'docs',
>>> '-b', 'html', tmpdir / 'sphinx',
>>> tmpdir / 'sphinx/out'])
>>> build_docs = (sphinx_build_test_out.returncode() == 0)
>>> endif
>> There is subtle error here, when sphinx_build not found, there is
>> SPHINX_ARGS should be [],
>> otherwise, latter place using SPHINX_ARGS have not found sphinx_build
>> will cause error by meson
>> ..
>> I'll add
>>
>> else
>> SPHINX_ARGS = []
>> endif
>
> All uses of SPHINX_ARGS are protected by build_docs, and in turn
> build_docs is false if "not sphinx_build.found()". Am I missing something?
Ah there are uses in tests/ too, those should all be under "if
build_docs" too.
Paolo
next prev parent reply other threads:[~2020-10-16 8:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 22:06 [PATCH v4 0/4] Fixes docs building on msys2/mingw Yonggang Luo
2020-10-15 22:06 ` [PATCH v4 1/4] docs: Fixes build docs " Yonggang Luo
2020-10-15 22:19 ` Paolo Bonzini
2020-10-16 3:07 ` 罗勇刚(Yonggang Luo)
2020-10-15 22:06 ` [PATCH v4 2/4] configure: the docdir option should passed to meson as is Yonggang Luo
2020-10-15 22:06 ` [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson Yonggang Luo
2020-10-16 7:46 ` Paolo Bonzini
2020-10-16 7:52 ` 罗勇刚(Yonggang Luo)
2020-10-16 7:57 ` Paolo Bonzini
2020-10-16 7:58 ` 罗勇刚(Yonggang Luo)
2020-10-16 7:58 ` 罗勇刚(Yonggang Luo)
2020-10-16 8:05 ` Paolo Bonzini [this message]
2020-10-16 8:12 ` 罗勇刚(Yonggang Luo)
2020-10-15 22:06 ` [PATCH v4 4/4] cirrus: Enable doc build on msys2/mingw 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=ff7823a5-0445-c57d-7dfb-b26a26dcde0e@redhat.com \
--to=pbonzini@redhat.com \
--cc=luoyonggang@gmail.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 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).