summaryrefslogtreecommitdiff
path: root/doc/sphinx
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2021-08-15 13:42:42 -0400
committerTom Rini <[email protected]>2021-08-15 13:42:42 -0400
commitfdc4fda33051bcb9eb782001afe2bdd3c0d09eae (patch)
tree24dac98ec7eb2c13c8d35275c4cd2a8a37debf44 /doc/sphinx
parent85ccbf666e549f0b06c29d565b9e4fdd87cf6600 (diff)
parent61ee780352e054df587d8781f23b323c967b5d2a (diff)
Merge tag 'efi-2021-10-rc2-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2021-10-rc2-2 Documentation: * Require Sphinx >= 2.4.4 for 'make htmldocs' * Move devicetree documentation to restructured text and update it * Document stm32mp1 devicetree bindings UEFI * Extend measurement to UEFI variables and ExitBootServices() * Support Uri() node in devicetree to text protocol * Add Linux magic token to RISC-V EFI test binaries
Diffstat (limited to 'doc/sphinx')
-rw-r--r--doc/sphinx/kerneldoc.py26
1 files changed, 3 insertions, 23 deletions
diff --git a/doc/sphinx/kerneldoc.py b/doc/sphinx/kerneldoc.py
index e9857ab904f..8189c33b9dd 100644
--- a/doc/sphinx/kerneldoc.py
+++ b/doc/sphinx/kerneldoc.py
@@ -37,18 +37,8 @@ import glob
from docutils import nodes, statemachine
from docutils.statemachine import ViewList
from docutils.parsers.rst import directives, Directive
-
-#
-# AutodocReporter is only good up to Sphinx 1.7
-#
import sphinx
-
-Use_SSI = sphinx.__version__[:3] >= '1.7'
-if Use_SSI:
- from sphinx.util.docutils import switch_source_input
-else:
- from sphinx.ext.autodoc import AutodocReporter
-
+from sphinx.util.docutils import switch_source_input
import kernellog
__version__ = '1.0'
@@ -163,18 +153,8 @@ class KernelDocDirective(Directive):
return [nodes.error(None, nodes.paragraph(text = "kernel-doc missing"))]
def do_parse(self, result, node):
- if Use_SSI:
- with switch_source_input(self.state, result):
- self.state.nested_parse(result, 0, node, match_titles=1)
- else:
- save = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter
- self.state.memo.reporter = AutodocReporter(result, self.state.memo.reporter)
- self.state.memo.title_styles, self.state.memo.section_level = [], 0
- try:
- self.state.nested_parse(result, 0, node, match_titles=1)
- finally:
- self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter = save
-
+ with switch_source_input(self.state, result):
+ self.state.nested_parse(result, 0, node, match_titles=1)
def setup(app):
app.add_config_value('kerneldoc_bin', None, 'env')