On Fri, Oct 16, 2020 at 3:57 PM Paolo Bonzini <
pbonzini@redhat.com> 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?
Not all protected, missed in qapi/schema tests
>
> Paolo
>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo