[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson |
Date: |
Fri, 16 Oct 2020 10:05:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
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
- Re: [PATCH v4 1/4] docs: Fixes build docs on msys2/mingw, (continued)
- [PATCH v4 2/4] configure: the docdir option should passed to meson as is., Yonggang Luo, 2020/10/15
- [PATCH v4 4/4] cirrus: Enable doc build on msys2/mingw, Yonggang Luo, 2020/10/15
- [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson, Yonggang Luo, 2020/10/15
- Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson, Paolo Bonzini, 2020/10/16
- Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson, Yonggang Luo, 2020/10/16
- Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson, Paolo Bonzini, 2020/10/16
- Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson, Yonggang Luo, 2020/10/16
- Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson, Yonggang Luo, 2020/10/16
- Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson,
Paolo Bonzini <=
- Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson, Yonggang Luo, 2020/10/16