qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]