summaryrefslogtreecommitdiffstats
path: root/Documentation/sphinx/kernel_include.py
diff options
context:
space:
mode:
authorMarkus Heiser2016-08-24 15:35:24 +0200
committerJonathan Corbet2016-09-01 16:19:02 +0200
commitb62b9d81a06f60ae4ad5f7a9c969f5b9680e2829 (patch)
tree07e63a98dcee6c93c88d70be40d8321ff005f217 /Documentation/sphinx/kernel_include.py
parentdocs-rst: kernel-doc: fix typedef output in RST format (diff)
downloadkernel-qcow2-linux-b62b9d81a06f60ae4ad5f7a9c969f5b9680e2829.tar.gz
kernel-qcow2-linux-b62b9d81a06f60ae4ad5f7a9c969f5b9680e2829.tar.xz
kernel-qcow2-linux-b62b9d81a06f60ae4ad5f7a9c969f5b9680e2829.zip
docs: sphinx-extensions: add metadata parallel-safe
The setup() function of a Sphinx-extension can return a dictionary. This is treated by Sphinx as metadata of the extension [1]. With metadata "parallel_read_safe = True" a extension is marked as save for "parallel reading of source". This is needed if you want build in parallel with N processes. E.g.: make SPHINXOPTS=-j4 htmldocs will no longer log warnings like: WARNING: the foobar extension does not declare if it is safe for parallel reading, assuming it isn't - please ask the extension author to check and make it explicit. Add metadata to extensions: * kernel-doc * flat-table * kernel-include [1] http://www.sphinx-doc.org/en/stable/extdev/#extension-metadata Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de> Tested-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/sphinx/kernel_include.py')
-rwxr-xr-xDocumentation/sphinx/kernel_include.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/sphinx/kernel_include.py b/Documentation/sphinx/kernel_include.py
index db5738238733..f523aa68a36b 100755
--- a/Documentation/sphinx/kernel_include.py
+++ b/Documentation/sphinx/kernel_include.py
@@ -39,11 +39,18 @@ from docutils.parsers.rst import directives
from docutils.parsers.rst.directives.body import CodeBlock, NumberLines
from docutils.parsers.rst.directives.misc import Include
+__version__ = '1.0'
+
# ==============================================================================
def setup(app):
# ==============================================================================
app.add_directive("kernel-include", KernelInclude)
+ return dict(
+ version = __version__,
+ parallel_read_safe = True,
+ parallel_write_safe = True
+ )
# ==============================================================================
class KernelInclude(Include):