Re: [dpdk-dev] [PATCH 2/2] doc: pass "werror" setting through to doc build
From: Aaron Conole <aconole@redhat.com>
Date: 2020-01-17 13:17:07
Bruce Richardson [off-list ref] writes:
When werror is set for the build, we should pass that flag through to sphinx so that it can flag warnings as errors too. Signed-off-by: Bruce Richardson <redacted> ---
I see that this actually works to generate the errors... BUT if we merge this it will break the build. Can you also insert a patch to address the warning so that the series could be merged?
quoted hunk ↗ jump to hunk
buildtools/call-sphinx-build.py | 5 ++--- doc/guides/meson.build | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-)diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py index 85c9e0156..fc4e9d040 100755 --- a/buildtools/call-sphinx-build.py +++ b/buildtools/call-sphinx-build.py@@ -9,12 +9,11 @@ from subprocess import run, PIPE, STDOUT from distutils.version import StrictVersion -(sphinx, src, dst) = sys.argv[1:] # assign parameters to variables +(*sphinx_cmd, src, dst) = sys.argv[1:] # assign parameters to variables # for sphinx version >= 1.7 add parallelism using "-j auto" -ver = run([sphinx, '--version'], stdout=PIPE, +ver = run(sphinx_cmd + ['--version'], stdout=PIPE, stderr=STDOUT).stdout.decode().split()[-1] -sphinx_cmd = [sphinx] if StrictVersion(ver) >= StrictVersion('1.7'): sphinx_cmd += ['-j', 'auto']diff --git a/doc/guides/meson.build b/doc/guides/meson.build index 732e7ad3a..5a2b854e8 100644 --- a/doc/guides/meson.build +++ b/doc/guides/meson.build@@ -7,6 +7,10 @@ if not sphinx.found() subdir_done() endif +if get_option('werror') + sphinx = [sphinx, '-W'] +endif + htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk') html_guides = custom_target('html_guides', input: files('index.rst'),