Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson

2020-10-16 Thread Yonggang Luo
On Fri, Oct 16, 2020 at 4:05 PM Paolo Bonzini wrote: > > 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

Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson

2020-10-16 Thread Paolo Bonzini
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

Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson

2020-10-16 Thread Yonggang Luo
On Fri, Oct 16, 2020 at 3:57 PM 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

Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson

2020-10-16 Thread Yonggang Luo
On Fri, Oct 16, 2020 at 3:57 PM 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

Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson

2020-10-16 Thread Paolo Bonzini
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

Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson

2020-10-16 Thread Yonggang Luo
On Fri, Oct 16, 2020 at 3:46 PM Paolo Bonzini wrote: > > Here is a better way to write the meson test: > > if get_option('sphinx_build') == '' > sphinx_build = find_program(['sphinx-build-3', 'sphinx-build'], > required: get_option('docs')) > else > sphinx_build

Re: [PATCH v4 3/4] meson: Move the detection logic for sphinx to meson

2020-10-16 Thread Paolo Bonzini
Here is a better way to write the meson test: if get_option('sphinx_build') == '' sphinx_build = find_program(['sphinx-build-3', 'sphinx-build'], required: get_option('docs')) else sphinx_build = find_program(get_option('sphinx_build'),

[PATCH v4 3/4] meson: Move the detection logic for sphinx to meson

2020-10-15 Thread Yonggang Luo
Signed-off-by: Yonggang Luo --- configure | 59 +++--- docs/meson.build | 4 +-- meson.build | 60 +++ meson_options.txt | 5 ++- tests/qapi-schema/meson.build | 2 +- 5