summaryrefslogtreecommitdiff
path: root/doc/conf.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-12-15 13:57:03 -0500
committerTom Rini <trini@konsulko.com>2020-12-15 13:57:03 -0500
commitaf22790a3bc2ab85108bdffad4bbe079a52160c1 (patch)
tree766c679c6dfce6c469be8119ea09b02fe5b8bc5e /doc/conf.py
parentc9cb6a6002fc91b045ac84b6d8fe0b34213dd320 (diff)
parentabd40a8f98ad546e34918f73865d7561a94bda44 (diff)
downloadu-boot-WIP/15Dec2020.tar.gz
Merge tag 'doc-2021-01-rc4' of https://gitlab.denx.de/u-boot/custodians/u-boot-efiWIP/15Dec2020
Documentation fixes for v2020.01-rc4 Move several README files to reStructured text for the HTML documentation. Describe register for global data on x86. Allow building HTML documentation with Sphinx 3
Diffstat (limited to 'doc/conf.py')
-rw-r--r--doc/conf.py29
1 files changed, 28 insertions, 1 deletions
diff --git a/doc/conf.py b/doc/conf.py
index 93250a6aee..ee7f201724 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -36,7 +36,34 @@ latex_engine = 'xelatex'
# 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', 'rstFlatTable', 'kernel_include', 'cdomain', 'kfigure']
+extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'kfigure']
+
+#
+# cdomain is badly broken in Sphinx 3+. Leaving it out generates *most*
+# of the docs correctly, but not all.
+#
+if major >= 3:
+ if (major > 3) or (minor > 0 or patch >= 2):
+ sys.stderr.write('''The build process with Sphinx 3+ is broken.
+You will have to remove -W in doc/Makefile.
+''')
+ # Sphinx c function parser is more pedantic with regards to type
+ # checking. Due to that, having macros at c:function cause problems.
+ # Those needed to be escaped by using c_id_attributes[] array
+ c_id_attributes = [
+
+ # include/linux/compiler.h
+ "__maybe_unused",
+
+ # include/efi.h
+ "EFIAPI",
+
+ # include/efi_loader.h
+ "__efi_runtime",
+ ]
+
+else:
+ extensions.append('cdomain')
# The name of the math extension changed on Sphinx 1.4
if (major == 1 and minor > 3) or (major > 1):