[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/12] configure: Honour --disable-werror for Sphinx
From: |
Peter Maydell |
Subject: |
[PULL 08/12] configure: Honour --disable-werror for Sphinx |
Date: |
Tue, 14 Apr 2020 17:26:09 +0100 |
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 <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-id: address@hidden
Reviewed-by: Alex Bennée <address@hidden>
---
configure | 9 ++++++++-
Makefile | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 233c671aaa9..9b1f5b33e45 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
+
# 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
}
# Check if tools are available to build documentation.
@@ -7631,6 +7637,7 @@ echo "INSTALL_PROG=$install -c -m 0755" >>
$config_host_mak
echo "INSTALL_LIB=$install -c -m 0644" >> $config_host_mak
echo "PYTHON=$python" >> $config_host_mak
echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak
+echo "SPHINX_WERROR=$sphinx_werror" >> $config_host_mak
echo "GENISOIMAGE=$genisoimage" >> $config_host_mak
echo "CC=$cc" >> $config_host_mak
if $iasl -h > /dev/null 2>&1; then
diff --git a/Makefile b/Makefile
index 84ef8816000..8a9113e6663 100644
--- a/Makefile
+++ b/Makefile
@@ -1076,7 +1076,7 @@ sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html \
# Note the use of different doctree for each (manual, builder) tuple;
# this works around Sphinx not handling parallel invocation on
# a single doctree: https://github.com/sphinx-doc/sphinx/issues/2946
-build-manual = $(call quiet-command,CONFDIR="$(qemu_confdir)" $(SPHINX_BUILD)
$(if $(V),,-q) -W -b $2 -D version=$(VERSION) -D release="$(FULL_VERSION)" -d
.doctrees/$1-$2 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1
,"SPHINX","$(MANUAL_BUILDDIR)/$1")
+build-manual = $(call quiet-command,CONFDIR="$(qemu_confdir)" $(SPHINX_BUILD)
$(if $(V),,-q) $(SPHINX_WERROR) -b $2 -D version=$(VERSION) -D
release="$(FULL_VERSION)" -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1
$(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1")
# We assume all RST files in the manual's directory are used in it
manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst
$(SRC_PATH)/docs/$1/*/*.rst) \
$(SRC_PATH)/docs/defs.rst.inc \
--
2.20.1
- [PULL 01/12] osdep.h: Drop no-longer-needed Coverity workarounds, (continued)
- [PULL 01/12] osdep.h: Drop no-longer-needed Coverity workarounds, Peter Maydell, 2020/04/14
- [PULL 02/12] thread.h: Fix Coverity version of qemu_cond_timedwait(), Peter Maydell, 2020/04/14
- [PULL 03/12] thread.h: Remove trailing semicolons from Coverity qemu_mutex_lock() etc, Peter Maydell, 2020/04/14
- [PULL 04/12] linux-user/flatload.c: Use "" for include of QEMU header target_flat.h, Peter Maydell, 2020/04/14
- [PULL 10/12] kernel-doc: Use c:struct for Sphinx 3.0 and later, Peter Maydell, 2020/04/14
- [PULL 06/12] scripts/coverity-scan: Add Docker support, Peter Maydell, 2020/04/14
- [PULL 07/12] docs: Improve our gdbstub documentation, Peter Maydell, 2020/04/14
- [PULL 05/12] scripts/run-coverity-scan: Script to run Coverity Scan build, Peter Maydell, 2020/04/14
- [PULL 11/12] docs: Require Sphinx 1.6 or better, Peter Maydell, 2020/04/14
- [PULL 12/12] Deprecate KVM support for AArch32, Peter Maydell, 2020/04/14
- [PULL 08/12] configure: Honour --disable-werror for Sphinx,
Peter Maydell <=
- [PULL 09/12] scripts/kernel-doc: Add missing close-paren in c:function directives, Peter Maydell, 2020/04/14
- Re: [PULL 00/12] target-arm queue, Peter Maydell, 2020/04/14