mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-14 00:47:26 +00:00
98f01cf7a2
Update the documentation build system according to Linux v5.11-rc1. Deactive the automarkup.py extension module which on Gitlab CI is incompatible with Unicode. With this patch we can build the HTML documentation using either of Sphinx 2 and Sphinx 3. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
32 lines
733 B
Python
32 lines
733 B
Python
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Sphinx has deprecated its older logging interface, but the replacement
|
|
# only goes back to 1.6. So here's a wrapper layer to keep around for
|
|
# as long as we support 1.4.
|
|
#
|
|
import sphinx
|
|
|
|
if sphinx.__version__[:3] >= '1.6':
|
|
UseLogging = True
|
|
from sphinx.util import logging
|
|
logger = logging.getLogger('kerneldoc')
|
|
else:
|
|
UseLogging = False
|
|
|
|
def warn(app, message):
|
|
if UseLogging:
|
|
logger.warning(message)
|
|
else:
|
|
app.warn(message)
|
|
|
|
def verbose(app, message):
|
|
if UseLogging:
|
|
logger.verbose(message)
|
|
else:
|
|
app.verbose(message)
|
|
|
|
def info(app, message):
|
|
if UseLogging:
|
|
logger.info(message)
|
|
else:
|
|
app.info(message)
|