From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 1/2] configure: Allow user to specify sphinx-build binary
Date: Mon, 03 Feb 2020 18:08:35 +0000 [thread overview]
Message-ID: <875zgna6ho.fsf@linaro.org> (raw)
In-Reply-To: <20200203132533.21850-2-peter.maydell@linaro.org>
Peter Maydell <peter.maydell@linaro.org> writes:
> Currently we insist on using 'sphinx-build' from the $PATH;
> allow the user to specify the binary to use. This will be
> more useful as we become pickier about the capabilities
> we require (eg needing a Python 3 sphinx-build).
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> I went with the most common convention for specifying "here's
> an executable", like --make=, --install=, --python=....
>
> The only odd one out for our current configure options seems to be
> that we want --with-git=GIT, not --git=GIT. You could argue that
> that's a better convention, but it makes more sense to me to
> stick with the convention we currently mostly have. (Perhaps
> we should even change --with-git= to --git= ?)
>
> configure | 10 +++++++++-
> Makefile | 2 +-
> 2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 5095f017283..830f325822a 100755
> --- a/configure
> +++ b/configure
> @@ -584,6 +584,7 @@ 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}"
> @@ -975,6 +976,8 @@ for opt do
> ;;
> --python=*) python="$optarg"
> ;;
> + --sphinx-build=*) sphinx_build="$optarg"
> + ;;
> --gcov=*) gcov_tool="$optarg"
> ;;
> --smbd=*) smbd="$optarg"
> @@ -1677,6 +1680,7 @@ Advanced options (experts only):
> --make=MAKE use specified make [$make]
> --install=INSTALL use specified install [$install]
> --python=PYTHON use specified python [$python]
> + --sphinx-build=SPHINX use specified sphinx-build [$sphinx_build]
> --smbd=SMBD use specified smbd [$smbd]
> --with-git=GIT use specified git [$git]
> --static enable static build [$static]
> @@ -4799,7 +4803,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
> }
>
> # Check if tools are available to build documentation.
> @@ -6474,6 +6478,9 @@ echo "QEMU_LDFLAGS $QEMU_LDFLAGS"
> echo "make $make"
> echo "install $install"
> echo "python $python ($python_version)"
> +if test "$docs" != "no"; then
> + echo "sphinx-build $sphinx_build"
> +fi
> echo "slirp support $slirp $(echo_version $slirp $slirp_version)"
> if test "$slirp" != "no" ; then
> echo "smbd $smbd"
> @@ -7503,6 +7510,7 @@ echo "INSTALL_DATA=$install -c -m 0644" >> $config_host_mak
> echo "INSTALL_PROG=$install -c -m 0755" >> $config_host_mak
> echo "INSTALL_LIB=$install -c -m 0644" >> $config_host_mak
> echo "PYTHON=$python" >> $config_host_mak
> +echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak
> echo "CC=$cc" >> $config_host_mak
> if $iasl -h > /dev/null 2>&1; then
> echo "IASL=$iasl" >> $config_host_mak
> diff --git a/Makefile b/Makefile
> index a6f5d440828..1f37523b528 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1024,7 +1024,7 @@ sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html \
> # Note the use of different doctree for each (manual, builder) tuple;
> # this works around Sphinx not handling parallel invocation on
> # a single doctree: https://github.com/sphinx-doc/sphinx/issues/2946
> -build-manual = $(call quiet-command,CONFDIR="$(qemu_confdir)" sphinx-build $(if $(V),,-q) -W -b $2 -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1")
> +build-manual = $(call quiet-command,CONFDIR="$(qemu_confdir)" $(SPHINX_BUILD) $(if $(V),,-q) -W -b $2 -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1")
> # We assume all RST files in the manual's directory are used in it
> manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst) \
> $(wildcard $(SRC_PATH)/docs/$1/*.rst.inc) \
--
Alex Bennée
next prev parent reply other threads:[~2020-02-03 18:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-03 13:25 [PATCH 0/2] configure: Check that sphinx-build is using Python 3 Peter Maydell
2020-02-03 13:25 ` [PATCH 1/2] configure: Allow user to specify sphinx-build binary Peter Maydell
2020-02-03 18:08 ` Alex Bennée [this message]
2020-02-04 10:39 ` Markus Armbruster
2020-02-04 12:37 ` Paolo Bonzini
2020-02-04 13:53 ` Wainer dos Santos Moschetta
2020-02-03 13:25 ` [PATCH 2/2] configure: Check that sphinx-build is using Python 3 Peter Maydell
2020-02-03 18:09 ` Alex Bennée
2020-02-04 13:58 ` Wainer dos Santos Moschetta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875zgna6ho.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).