diff mbox series

[RFC,03/10] docs/conf.py: Enable use of kerneldoc sphinx extension

Message ID 20190521122519.12573-4-peter.maydell@linaro.org (mailing list archive)
State New, archived
Headers show
Series Add kernel-doc support to our Sphinx setup | expand

Commit Message

Peter Maydell May 21, 2019, 12:25 p.m. UTC
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 docs/conf.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/docs/conf.py b/docs/conf.py
index befbcc6c3e1..9109edbcb97 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -41,8 +41,7 @@  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.
 #
-# sys.path.insert(0, os.path.join(qemu_docdir, "my_subdir"))
-
+sys.path.insert(0, os.path.join(qemu_docdir, "sphinx"))
 
 # -- General configuration ------------------------------------------------
 
@@ -54,7 +53,7 @@  needs_sphinx = '1.3'
 # Add any Sphinx extension module names here, as strings. They can be
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
 # ones.
-extensions = []
+extensions = ['kerneldoc']
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
@@ -213,4 +212,10 @@  texinfo_documents = [
 ]
 
 
+# -- Options for configuring kerneldoc extension  -------------------------
 
+# 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_srctree = os.path.join(qemu_docdir, '..')