qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] configure: prefer sphinx-build to sphinx-build-3


From: Peter Maydell
Subject: Re: [PATCH v2] configure: prefer sphinx-build to sphinx-build-3
Date: Thu, 14 May 2020 11:40:23 +0100

On Wed, 13 May 2020 at 22:52, John Snow <address@hidden> wrote:

> +# We require the python3 version of sphinx, but sphinx-build-3 is a
> +# distro package. prefer 'sphinx-build' to find the venv version, if
> +# any, but ensure it is a suitable version.
>  sphinx_build=
> -for binary in sphinx-build-3 sphinx-build
> +sphinx_ok=
> +for binary in sphinx-build sphinx-build-3
>  do
>      if has "$binary"
>      then
> -        sphinx_build=$(command -v "$binary")
> -        break
> +        sphinx_candidate=$(command -v "$binary")
> +        if test_sphinx_build "$sphinx_candidate"
> +        then
> +            sphinx_build=$sphinx_candidate
> +            sphinx_ok=yes
> +            break
> +        fi
>      fi
>  done

Here we look for a sphinx binary that works, and if
we find one then we set sphinx_build to that binary and
set sphinx_ok to 'yes'.

But then (in the part of configure between these two patch hunks)
if the user uses the command line --sphinx-build=foo option we
will reset sphinx_build but don't reset sphinx_ok...

>  # Check if tools are available to build documentation.
>  if test "$docs" != "no" ; then
> -  if has_sphinx_build; then
> -    sphinx_ok=yes
> -  else
> -    sphinx_ok=no
> +
> +  if [ "$sphinx_ok" != "yes" ]; then
> +    if test_sphinx_build "$sphinx_build"; then
> +      sphinx_ok=yes
> +    else
> +      sphinx_ok=no
> +    fi
>    fi

...which means we'll skip this check entirely and won't
test to see whether the user-specified sphinx-build binary works.

> +
>    if has makeinfo && has pod2man && test "$sphinx_ok" = "yes"; then
>      docs=yes
>    else

thanks
-- PMM



reply via email to

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