qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 01/30] configure: Allow user to specify sphinx-build binar


From: Peter Maydell
Subject: Re: [PATCH v2 01/30] configure: Allow user to specify sphinx-build binary
Date: Fri, 14 Feb 2020 09:21:34 +0000

On Fri, 14 Feb 2020 at 06:33, Markus Armbruster <address@hidden> wrote:
>
> Does not work out of the box on my Fedora 30 build host, where
> sphinx-build gives me sphinx-build-2.  I have to specify
> --sphinx-build=/usr/bin/sphinx-build-3 to unbreak it.  Which of course
> breaks things when I try to build anything before this commit
>
> The appended patch makes it work out of the box.  Please consider
> squashing it in.
>
> diff --git a/configure b/configure
> index 14172909f0..a9d175c400 100755
> --- a/configure
> +++ b/configure
> @@ -584,7 +584,6 @@ query_pkg_config() {
>  }
>  pkg_config=query_pkg_config
>  sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}"
> -sphinx_build=sphinx-build
>
>  # If the user hasn't specified ARFLAGS, default to 'rv', just as make does.
>  ARFLAGS="${ARFLAGS-rv}"
> @@ -903,6 +902,7 @@ fi
>
>  : ${make=${MAKE-make}}
>  : ${install=${INSTALL-install}}
> +
>  # We prefer python 3.x. A bare 'python' is traditionally
>  # python 2.x, but some distros have it as python 3.x, so
>  # we check that too
> @@ -915,6 +915,19 @@ do
>          break
>      fi
>  done
> +
> +set -x

I guess the set -x / set +x here are accidentally left in
debug printing?

> +sphinx_build=
> +for binary in sphinx-build-3 sphinx-build
> +do
> +    if has "$binary"
> +    then
> +        sphinx_build=$(command -v "$binary")
> +        break
> +    fi
> +done
> +set +x
> +
>  : ${smbd=${SMBD-/usr/sbin/smbd}}
>
>  # Default objcc to clang if available, otherwise use CC
> @@ -4803,7 +4816,7 @@ has_sphinx_build() {
>      # sphinx-build doesn't exist at all or if it is too old.
>      mkdir -p "$TMPDIR1/sphinx"
>      touch "$TMPDIR1/sphinx/index.rst"
> -    $sphinx_build -c "$source_path/docs" -b html "$TMPDIR1/sphinx" 
> "$TMPDIR1/sphinx/out" >/dev/null 2>&1
> +    "$sphinx_build" -c "$source_path/docs" -b html "$TMPDIR1/sphinx" 
> "$TMPDIR1/sphinx/out" >/dev/null 2>&1
>  }

This change isn't related to trying sphinx-build-3 --
did you actually need it ?

I did think about quoting when I wrote the patch,
but looking at existing practice we are all over the
place on whether we bother to quote variables containing
program names in configure. I think I ended up following
the same thing we do for $python, which doesn't quote.

Other than that, I'm happy to squash this in, or for
you to squash it in if you are otherwise OK taking
the first chunk of the patchset via your tree now.
(Do you have a preference for whether you take these
patches via your tree or I send them in a docs pullreq?)

thanks
-- PMM



reply via email to

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