mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 02:58:29 +00:00
Makefile, configure: Support building rST documentation
Add support to our configure and makefile machinery for building our rST docs into HTML files. Building the documentation now requires that sphinx-build is available; this seems better than allowing half the docs to be built if it is not present but having half of them missing. (In particular it means that assuming that distros configured with --enable-docs they'll get a helpful error from configure telling them the new build dependency.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20190305172139.32662-10-peter.maydell@linaro.org Message-id: 20190228145624.24885-10-peter.maydell@linaro.org
This commit is contained in:
15
configure
vendored
15
configure
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user