diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-03-07 15:21:54 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-03-07 15:21:54 +0000 |
commit | 21afe115a49776aa07f4d93d22b9ad133fd183a5 (patch) | |
tree | 06c13402442f44873748d983cf1d56b28bcac405 /configure | |
parent | 3a75ef6a0fe397b0d36930415be6b123750a6afe (diff) | |
parent | c10e01b996df09f6cb4eceb2b7a9754bece927c9 (diff) |
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-sphinx-20190307' into staging
Enable building and installing rST docs with Sphinx
# gpg: Signature made Thu 07 Mar 2019 15:05:12 GMT
# gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg: issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE
* remotes/pmaydell/tags/pull-sphinx-20190307:
MAINTAINERS: Add entry for Sphinx documentation infrastructure
docs/conf.py: Don't hard-code QEMU version
Makefile: Abstract out "identify the pkgversion" code
Makefile, configure: Support building rST documentation
docs: Provide separate conf.py for each manual we want
docs/conf.py: Disable option warnings
docs/conf.py: Don't include rST sources in HTML build
docs/conf.py: Configure the 'alabaster' theme
docs/conf.py: Disable unused _static directory
docs: Commit initial files from sphinx-quickstart
docs: Convert memory.txt to rst format
docs/cpu-hotplug.rst: Fix rST markup issues
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -4589,13 +4589,24 @@ if compile_prog "" "" ; then syncfs=yes fi +# Check we have a new enough version of sphinx-build +has_sphinx_build() { + # 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 either + # 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 +} + # Check if tools are available to build documentation. if test "$docs" != "no" ; then - if has makeinfo && has pod2man; then + if has makeinfo && has pod2man && has_sphinx_build; then docs=yes else if test "$docs" = "yes" ; then - feature_not_found "docs" "Install texinfo and Perl/perl-podlators" + feature_not_found "docs" "Install texinfo, Perl/perl-podlators and python-sphinx" fi docs=no fi |