mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-21 22:46:35 +00:00
Make the docs build "work" with Sphinx 3.x
The Sphinx 3.x upgrade broke a number of things in our special "cdomain" module that are not easy to fix. For now, just disable that module for the 3.x build and put out a warning that the build will not be perfect. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
9f364b605f
commit
afde706afd
1 changed files with 14 additions and 1 deletions
|
@ -36,10 +36,23 @@ needs_sphinx = '1.3'
|
||||||
# Add any Sphinx extension module names here, as strings. They can be
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
# ones.
|
# ones.
|
||||||
extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'cdomain',
|
extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include',
|
||||||
'kfigure', 'sphinx.ext.ifconfig', 'automarkup',
|
'kfigure', 'sphinx.ext.ifconfig', 'automarkup',
|
||||||
'maintainers_include', 'sphinx.ext.autosectionlabel' ]
|
'maintainers_include', 'sphinx.ext.autosectionlabel' ]
|
||||||
|
|
||||||
|
#
|
||||||
|
# cdomain is badly broken in Sphinx 3+. Leaving it out generates *most*
|
||||||
|
# of the docs correctly, but not all. Scream bloody murder but allow
|
||||||
|
# the process to proceed; hopefully somebody will fix this properly soon.
|
||||||
|
#
|
||||||
|
if major >= 3:
|
||||||
|
sys.stderr.write('''WARNING: The kernel documentation build process
|
||||||
|
does not work correctly with Sphinx v3.0 and above. Expect errors
|
||||||
|
in the generated output.
|
||||||
|
''')
|
||||||
|
else:
|
||||||
|
extensions.append('cdomain')
|
||||||
|
|
||||||
# Ensure that autosectionlabel will produce unique names
|
# Ensure that autosectionlabel will produce unique names
|
||||||
autosectionlabel_prefix_document = True
|
autosectionlabel_prefix_document = True
|
||||||
autosectionlabel_maxdepth = 2
|
autosectionlabel_maxdepth = 2
|
||||||
|
|
Loading…
Add table
Reference in a new issue