qemu/docs/sphinx
Peter Maydell 364206640c docs/sphinx/kerneldoc.py: Honour --enable-werror
Currently, the kerneldoc Sphinx plugin doesn't honour the
--enable-werror configure option, so its warnings are never fatal.
This is because although we do pass sphinx-build the -W switch, the
warnings from kerneldoc are produced by the scripts/kernel-doc script
directly and don't go through Sphinx's "emit a warning" function.

When --enable-werror is in effect, pass sphinx-build an extra
argument -Dkerneldoc_werror=1.  The kerneldoc plugin can then use
this to determine whether it should be passing the kernel-doc script
-Werror.

We do this because there is no documented mechanism for
a Sphinx plugin to determine whether sphinx-build was
passed -W or not; if one is provided then we can switch to
that at a later date:
https://github.com/sphinx-doc/sphinx/issues/11239

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230314114431.1096972-1-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2023-03-16 14:39:10 +01:00
..
dbusdoc.py docs/sphinx: add sphinx modules to include D-Bus documentation 2021-12-21 10:50:21 +04:00
dbusdomain.py docs/sphinx: add sphinx modules to include D-Bus documentation 2021-12-21 10:50:21 +04:00
dbusparser.py docs/sphinx: add sphinx modules to include D-Bus documentation 2021-12-21 10:50:21 +04:00
depfile.py docs/sphinx: add templates files to generated depfile 2021-11-08 12:27:23 +04:00
fakedbusdoc.py docs/sphinx: fix compatibility with sphinx < 1.8 2022-01-05 11:10:13 +01:00
hxtool.py docs/sphinx/hxtool.py: Remove STEXI/ETEXI support 2020-03-12 11:14:06 +00:00
kerneldoc.py docs/sphinx/kerneldoc.py: Honour --enable-werror 2023-03-16 14:39:10 +01:00
kernellog.py docs: import Linux kernel-doc script and extension 2019-12-17 19:36:32 +01:00
qapidoc.py qapidoc: introduce QAPISchemaIfCond.docgen() 2021-08-26 13:53:56 +02:00
qmp_lexer.py