aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-05 12:48:15 -0400
committerDavid Robillard <d@drobilla.net>2023-05-05 13:14:07 -0400
commitdbe5e1a7e147c3624e1a6b6a09ee8ba1ac7ec934 (patch)
tree4d4e649b3ab4016e955008f409772a80746b8c8a
parent910991a1ddf4e704f139ad1e919912d5c58e578e (diff)
downloadserd-dbe5e1a7e147c3624e1a6b6a09ee8ba1ac7ec934.tar.gz
serd-dbe5e1a7e147c3624e1a6b6a09ee8ba1ac7ec934.tar.bz2
serd-dbe5e1a7e147c3624e1a6b6a09ee8ba1ac7ec934.zip
Fail on documentation warnings when werror=true
-rw-r--r--doc/c/meson.build15
1 files changed, 9 insertions, 6 deletions
diff --git a/doc/c/meson.build b/doc/c/meson.build
index 55da7cb0..3a6a3923 100644
--- a/doc/c/meson.build
+++ b/doc/c/meson.build
@@ -50,6 +50,11 @@ subdir('api')
# Generate documentation with sphinx
+sphinx_flags = ['-E', '-a', '-q']
+if get_option('werror')
+ sphinx_flags += ['-W']
+endif
+
# TODO: Add install_tag: 'doc' after requiring meson 0.60.0
custom_target(
@@ -57,9 +62,8 @@ custom_target(
build_by_default: true,
command: [
sphinx_build,
- '-M', 'singlehtml', '@OUTDIR@', '@OUTDIR@',
- '-E', '-q', '-t', 'singlehtml',
- ],
+ '-M', 'singlehtml', '@OUTDIR@', '@OUTDIR@', '-t', 'singlehtml',
+ ] + sphinx_flags,
input: [c_rst_files, c_serd_rst, c_index_xml, conf_py],
install: true,
install_dir: docdir / versioned_name,
@@ -71,9 +75,8 @@ custom_target(
build_by_default: true,
command: [
sphinx_build,
- '-M', 'html', '@OUTDIR@', '@OUTDIR@',
- '-E', '-q', '-t', 'html',
- ],
+ '-M', 'html', '@OUTDIR@', '@OUTDIR@', '-t', 'html',
+ ] + sphinx_flags,
input: [c_rst_files, c_serd_rst, c_index_xml, conf_py],
install: true,
install_dir: docdir / versioned_name,