diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-10-17 20:52:55 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-10-17 20:52:55 +0100 |
commit | 782d7b30dd8e27ba24346e7c411b476db88b59e7 (patch) | |
tree | c0210a939d942717719a7249639b8149f9d9c248 /docs | |
parent | e12ce85b2c79d83a340953291912875c30b3af06 (diff) | |
parent | c47110d90fa5401bcc42c17f8ae0724a1c96599a (diff) | |
download | qemu-782d7b30dd8e27ba24346e7c411b476db88b59e7.zip qemu-782d7b30dd8e27ba24346e7c411b476db88b59e7.tar.gz qemu-782d7b30dd8e27ba24346e7c411b476db88b59e7.tar.bz2 |
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
* Drop ninjatool and just require ninja (Paolo)
* Fix docs build under msys2 (Yonggang)
* HAX snafu fix (Claudio)
* Disable signal handlers during fuzzing (Alex)
* Miscellaneous fixes (Bruce, Greg)
# gpg: Signature made Sat 17 Oct 2020 15:45:56 BST
# gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg: issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini-gitlab/tags/for-upstream: (22 commits)
ci: include configure and meson logs in all jobs if configure fails
hax: unbreak accelerator cpu code after cpus.c split
fuzz: Disable QEMU's SIG{INT,HUP,TERM} handlers
cirrus: Enable doc build on msys2/mingw
meson: Move the detection logic for sphinx to meson
meson: move SPHINX_ARGS references within "if build_docs"
docs: Fix Sphinx configuration for msys2/mingw
meson: Only install icons and qemu.desktop if have_system
configure: fix handling of --docdir parameter
meson: cleanup curses/iconv test
meson.build: don't condition iconv detection on library detection
build: add --enable/--disable-libudev
build: replace ninjatool with ninja
build: cleanups to Makefile
add ninja to dockerfiles, CI configurations and test VMs
dockerfiles: enable Centos 8 PowerTools
configure: move QEMU_INCLUDES to meson
tests: add missing generated sources to testqapi
make: run shell with pipefail
tests/Makefile.include: unbreak non-tcg builds
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/conf.py | 2 | ||||
-rw-r--r-- | docs/devel/build-system.rst | 6 | ||||
-rw-r--r-- | docs/meson.build | 46 | ||||
-rw-r--r-- | docs/sphinx/kerneldoc.py | 2 |
4 files changed, 50 insertions, 6 deletions
diff --git a/docs/conf.py b/docs/conf.py index 00e1b75..e584f68 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -241,7 +241,7 @@ texinfo_documents = [ # We use paths starting from qemu_docdir here so that you can run # sphinx-build from anywhere and the kerneldoc extension can still # find everything. -kerneldoc_bin = os.path.join(qemu_docdir, '../scripts/kernel-doc') +kerneldoc_bin = ['perl', os.path.join(qemu_docdir, '../scripts/kernel-doc')] kerneldoc_srctree = os.path.join(qemu_docdir, '..') hxtool_srctree = os.path.join(qemu_docdir, '..') qapidoc_srctree = os.path.join(qemu_docdir, '..') diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst index 2ee368f..6fcf885 100644 --- a/docs/devel/build-system.rst +++ b/docs/devel/build-system.rst @@ -404,10 +404,8 @@ Built by Meson: Built by Makefile: `Makefile.ninja` - A Makefile conversion of the build rules in build.ninja. The conversion - is straightforward and, were it necessary to debug the rules produced - by Meson, it should be enough to look at build.ninja. The conversion - is performed by scripts/ninjatool.py. + A Makefile include that bridges to ninja for the actual build. The + Makefile is mostly a list of targets that Meson included in build.ninja. `Makefile.mtest` The Makefile definitions that let "make check" run tests defined in diff --git a/docs/meson.build b/docs/meson.build index 0340d48..8c222f9 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -1,4 +1,50 @@ +if get_option('sphinx_build') == '' + sphinx_build = find_program(['sphinx-build-3', 'sphinx-build'], + required: get_option('docs')) +else + sphinx_build = find_program(get_option('sphinx_build'), + required: get_option('docs')) +endif + +# Check if tools are available to build documentation. +build_docs = false +if sphinx_build.found() + SPHINX_ARGS = [sphinx_build] + # If we're making warnings fatal, apply this to Sphinx runs as well + if get_option('werror') + SPHINX_ARGS += [ '-W' ] + endif + + # 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 sphinx-build is too old. + run_command('mkdir', ['-p', tmpdir / 'sphinx']) + run_command('touch', [tmpdir / 'sphinx/index.rst']) + sphinx_build_test_out = run_command(SPHINX_ARGS + [ + '-c', meson.current_source_dir(), + '-b', 'html', tmpdir / 'sphinx', + tmpdir / 'sphinx/out']) + build_docs = (sphinx_build_test_out.returncode() == 0) + + if not build_docs + warning('@0@ exists but it is either too old or uses too old a Python version'.format(get_option('sphinx_build'))) + if get_option('docs').enabled() + error('Install a Python 3 version of python-sphinx') + endif + endif +endif + if build_docs + SPHINX_ARGS += ['-Dversion=' + meson.project_version(), '-Drelease=' + config_host['PKGVERSION']] + + sphinx_extn_depends = [ meson.source_root() / 'docs/sphinx/depfile.py', + meson.source_root() / 'docs/sphinx/hxtool.py', + meson.source_root() / 'docs/sphinx/kerneldoc.py', + meson.source_root() / 'docs/sphinx/kernellog.py', + meson.source_root() / 'docs/sphinx/qapidoc.py', + meson.source_root() / 'docs/sphinx/qmp_lexer.py', + qapi_gen_depends ] + configure_file(output: 'index.html', input: files('index.html.in'), configuration: {'VERSION': meson.project_version()}, diff --git a/docs/sphinx/kerneldoc.py b/docs/sphinx/kerneldoc.py index 3e87940..3ac277d 100644 --- a/docs/sphinx/kerneldoc.py +++ b/docs/sphinx/kerneldoc.py @@ -67,7 +67,7 @@ class KernelDocDirective(Directive): def run(self): env = self.state.document.settings.env - cmd = [env.config.kerneldoc_bin, '-rst', '-enable-lineno'] + cmd = env.config.kerneldoc_bin + ['-rst', '-enable-lineno'] filename = env.config.kerneldoc_srctree + '/' + self.arguments[0] export_file_patterns = [] |