From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH for-5.0? 1/3] configure: Honour --disable-werror for Sphinx
Date: Tue, 14 Apr 2020 15:48:08 +0100 [thread overview]
Message-ID: <877dyi9l93.fsf@linaro.org> (raw)
In-Reply-To: <20200411182934.28678-2-peter.maydell@linaro.org>
Peter Maydell <peter.maydell@linaro.org> writes:
> If we are not making warnings fatal for compilation, make them
> non-fatal when building the Sphinx documentation also. (For instance
> Sphinx 3.0 warns about some constructs that older versions were happy
> with, which is a build failure if we use the warnings-as-errors
> flag.)
>
> This provides a workaround at least for LP:1872113.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> configure | 9 ++++++++-
> Makefile | 2 +-
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 22870f38672..7b9ae0418d0 100755
> --- a/configure
> +++ b/configure
> @@ -4928,6 +4928,12 @@ if check_include sys/kcov.h ; then
> kcov=yes
> fi
>
> +# If we're making warnings fatal, apply this to Sphinx runs as well
> +sphinx_werror=""
> +if test "$werror" = "yes"; then
> + sphinx_werror="-W"
> +fi
> +
I wonder if this would have caught the failure I was seeing on debian9 +
mxe images?
> # Check we have a new enough version of sphinx-build
> has_sphinx_build() {
> # This is a bit awkward but works: create a trivial document and
> @@ -4936,7 +4942,7 @@ has_sphinx_build() {
> # sphinx-build doesn't exist at all or if it is too old.
> mkdir -p "$TMPDIR1/sphinx"
> touch "$TMPDIR1/sphinx/index.rst"
> - "$sphinx_build" -c "$source_path/docs" -b html "$TMPDIR1/sphinx" "$TMPDIR1/sphinx/out" >/dev/null 2>&1
> + "$sphinx_build" $sphinx_werror -c "$source_path/docs" -b html
> "$TMPDIR1/sphinx" "$TMPDIR1/sphinx/out" >/dev/null 2>&1
Note this will clash with the simple configure change I made to redirect
the output to config.log.
Anyway:
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
next prev parent reply other threads:[~2020-04-14 16:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-11 18:29 [PATCH for-5.0? 0/3] Make docs build work with Sphinx 3 Peter Maydell
2020-04-11 18:29 ` [PATCH for-5.0? 1/3] configure: Honour --disable-werror for Sphinx Peter Maydell
2020-04-11 20:11 ` Richard Henderson
2020-04-14 14:48 ` Alex Bennée [this message]
2020-04-11 18:29 ` [PATCH for-5.0? 2/3] scripts/kernel-doc: Add missing close-paren in c:function directives Peter Maydell
2020-04-11 20:11 ` Richard Henderson
2020-04-14 14:56 ` Alex Bennée
2020-04-11 18:29 ` [PATCH for-5.0? 3/3] kernel-doc: Use c:struct for Sphinx 3.0 and later Peter Maydell
2020-04-14 12:45 ` Peter Maydell
2020-04-14 15:53 ` Alex Bennée
2020-04-14 15:57 ` Peter Maydell
2020-04-13 7:13 ` [PATCH for-5.0? 0/3] Make docs build work with Sphinx 3 Paolo Bonzini
2020-04-13 18:08 ` Supported Sphinx Versions (was: Re: [PATCH for-5.0? 0/3] Make docs build work with Sphinx 3) John Snow
2020-04-13 18:22 ` Peter Maydell
2020-04-13 19:24 ` John Snow
2020-04-14 7:53 ` Supported Sphinx Versions Markus Armbruster
2020-04-15 16:43 ` Supported Build Platforms (Again) (Was Re: Supported Sphinx Versions) John Snow
2020-04-15 17:37 ` Daniel P. Berrangé
2020-04-16 6:02 ` Markus Armbruster
2020-04-14 10:28 ` Supported Sphinx Versions (was: Re: [PATCH for-5.0? 0/3] Make docs build work with Sphinx 3) Peter Maydell
2020-04-14 12:22 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877dyi9l93.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).