summaryrefslogtreecommitdiffstats
path: root/Documentation/conf.py
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2016-05-20 04:51:47 -0400
committerJani Nikula <jani.nikula@intel.com>2016-05-30 06:38:52 -0400
commit24dcdeb28b55afafa9cdf6acedd78cf1aa8f8428 (patch)
treea7152965a7b66c036032ee6975e1b20b480a407a /Documentation/conf.py
parentc56de1db54dfbbdfc02a500388952af16e3a9368 (diff)
Documentation/sphinx: configure the kernel-doc extension
Tell Sphinx where to find the extension, and pass on the kernel src tree and kernel-doc paths to the extension. With this, any .rst files under Documentation may contain the kernel-doc rst directive to include kernel-doc documentation from any source file. While building, it may be handy to pass kernel-doc extension configuration on the command line. For example, 'make SPHINXOPTS="-D kerneldoc_verbosity=0" htmldocs' silences all stderr output from kernel-doc when the kernel-doc exit code is 0. (The stderr will be logged unconditionally when the exit code is non-zero.) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'Documentation/conf.py')
-rw-r--r--Documentation/conf.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/conf.py b/Documentation/conf.py
index 0f0e20757bb1..8b72577f38f5 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -18,7 +18,7 @@ import os
18# If extensions (or modules to document with autodoc) are in another directory, 18# If extensions (or modules to document with autodoc) are in another directory,
19# add these directories to sys.path here. If the directory is relative to the 19# add these directories to sys.path here. If the directory is relative to the
20# documentation root, use os.path.abspath to make it absolute, like shown here. 20# documentation root, use os.path.abspath to make it absolute, like shown here.
21#sys.path.insert(0, os.path.abspath('.')) 21sys.path.insert(0, os.path.abspath('sphinx'))
22 22
23# -- General configuration ------------------------------------------------ 23# -- General configuration ------------------------------------------------
24 24
@@ -28,7 +28,7 @@ import os
28# Add any Sphinx extension module names here, as strings. They can be 28# Add any Sphinx extension module names here, as strings. They can be
29# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 29# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
30# ones. 30# ones.
31extensions = [] 31extensions = ['kernel-doc']
32 32
33# Gracefully handle missing rst2pdf. 33# Gracefully handle missing rst2pdf.
34try: 34try:
@@ -385,3 +385,9 @@ epub_exclude_files = ['search.html']
385pdf_documents = [ 385pdf_documents = [
386 ('index', u'Kernel', u'Kernel', u'J. Random Bozo'), 386 ('index', u'Kernel', u'Kernel', u'J. Random Bozo'),
387] 387]
388
389# kernel-doc extension configuration for running Sphinx directly (e.g. by Read
390# the Docs). In a normal build, these are supplied from the Makefile via command
391# line arguments.
392kerneldoc_bin = '../scripts/kernel-doc'
393kerneldoc_srctree = '..'