mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
docs/sphinx: Add new qapi-doc Sphinx extension
Some of our documentation is auto-generated from documentation comments in the JSON schema. For Sphinx, rather than creating a file to include, the most natural way to handle this is to have a small custom Sphinx extension which processes the JSON file and inserts documentation into the rST file being processed. This is the same approach that kerneldoc and hxtool use. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20200925162316.21205-8-peter.maydell@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Comment and doc string formatting tweaked, unused method dropped, a few line breaks tweaked to follow PEP 8 more closely, MAINTAINERS section QAPI updated] Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
committed by
Markus Armbruster
parent
44e12af775
commit
4078ee5469
@@ -2387,6 +2387,7 @@ F: tests/test-qmp-*.c
|
||||
F: tests/test-visitor-serialization.c
|
||||
F: scripts/qapi-gen.py
|
||||
F: scripts/qapi/*
|
||||
F: docs/sphinx/qapidoc.py
|
||||
F: docs/devel/qapi*
|
||||
T: git https://repo.or.cz/qemu/armbru.git qapi-next
|
||||
|
||||
@@ -3151,6 +3152,7 @@ M: Peter Maydell <peter.maydell@linaro.org>
|
||||
S: Maintained
|
||||
F: docs/conf.py
|
||||
F: docs/*/conf.py
|
||||
F: docs/sphinx/
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
+5
-1
@@ -52,7 +52,10 @@ except NameError:
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use an absolute path starting from qemu_docdir.
|
||||
#
|
||||
# Our extensions are in docs/sphinx; the qapidoc extension requires
|
||||
# the QAPI modules from scripts/.
|
||||
sys.path.insert(0, os.path.join(qemu_docdir, "sphinx"))
|
||||
sys.path.insert(0, os.path.join(qemu_docdir, "../scripts"))
|
||||
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
@@ -67,7 +70,7 @@ needs_sphinx = '1.6'
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = ['kerneldoc', 'qmp_lexer', 'hxtool', 'depfile']
|
||||
extensions = ['kerneldoc', 'qmp_lexer', 'hxtool', 'depfile', 'qapidoc']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
@@ -241,3 +244,4 @@ texinfo_documents = [
|
||||
kerneldoc_bin = 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, '..')
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user