From nobody Tue Nov 5 14:37:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1586629978; cv=none; d=zohomail.com; s=zohoarc; b=M3LkubT+Z8jjg/JgqNKyTnQpMx1nWSsjJt8VFSR9wRy3caKIypO+fdTRs/kNipfpUxhN28tHJNXD4zmD4dKQRZV3nY+LftwzkmvuRc4jr60HeelVGnH3n+aOben9LetUiz3IlhTjBtKJGX2Jd0wOUu8BG/bdtu+DJxM2h8lMxJA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586629978; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=K3xopzk9ZlZX+c2ieZ27XJmBTBZ8Z8Hb6pkp8KbVxfo=; b=bRxoH8KZL4VaP6rx7mWF5wrIZq+Te4aevkJcet3E3N2RpDWnsHg+fA41jIuAgORFo2/+B33iM48xzCIUBPdkeGV5BgOCwbboSSVFhxQYAguebiaL9Ecl4t5mbNe9pWs5WanMMBlfUBKH2qA7OnhNip79FKIPblegVH1AMxErzvQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586629978650693.3000954265857; Sat, 11 Apr 2020 11:32:58 -0700 (PDT) Received: from localhost ([::1]:54656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNKw5-0008Ll-C7 for importer@patchew.org; Sat, 11 Apr 2020 14:32:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34743) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNKst-00064u-Qs for qemu-devel@nongnu.org; Sat, 11 Apr 2020 14:29:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNKss-0003O5-L9 for qemu-devel@nongnu.org; Sat, 11 Apr 2020 14:29:39 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:36985) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNKss-0003NM-FT for qemu-devel@nongnu.org; Sat, 11 Apr 2020 14:29:38 -0400 Received: by mail-wr1-x430.google.com with SMTP id w10so5803296wrm.4 for ; Sat, 11 Apr 2020 11:29:38 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id 68sm8910939wrm.65.2020.04.11.11.29.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Apr 2020 11:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K3xopzk9ZlZX+c2ieZ27XJmBTBZ8Z8Hb6pkp8KbVxfo=; b=tM3tqWQtJRDv2IXwsoJYlHcQ+FpbV4uKwGDcux9RYRzQt3b9x2Ff8CwuvHsi14p/t3 vfjqZXUl9WdGMhtgycXJ/6hwuHZQzoqRcR8/eHXo1mQP5dRcPNwB3W/BtaoYfSBQ6N9e 6LLQUHh97L6QI7kNcLX2sYItUmnALrcEjoF21+GuoIE6nkk/WltzPK3DjYAtm2v5rNL7 8tl1NneRbFFA5BevQoujKS1CLdB09YhQE7YPuCPHecK0GpmokmG4ICyGe0V6x+oaWrOX NYVvLm6fDiJy1Wv+802tw2kqEuXUOTE9SI3UmuHCPQxySAsYr5eIA1pITdVAmp9RdEPD mktw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K3xopzk9ZlZX+c2ieZ27XJmBTBZ8Z8Hb6pkp8KbVxfo=; b=nVZUhecpEMoESfvAzGQfense7n+fOw7Bd1ND3uYY2wm8wmS+fN7QKQY3y319tbMstW +904ZsJB3FRMJ3nKJyqus5igIa9W9V1TqA36VQLtLWfTV5ZPCoD2g+mKGVbeemC3ffvD ukqvQFuX91moyrYR45q6mJfNCFXyRT720kwnKBH+//4dS2HvWO+g8N8cRytySCdsVv5C iFp3+iNUW4jS5nTjsZ+tpqIg1lMDbvQlfcQfoXa0Ye8uvggf49Rw0ka455Q2txnhq4zU LaY1sOVgJg5CRBKMDamu9IchwB+8yroMLbHxnuGeDdl0NvZLynuCTVFUI4z5XCzgdPKZ BRsw== X-Gm-Message-State: AGi0PuYzYKpV0q3hhd770qnI4FkDoWVyAwkDhEX9sV6kiF/QB4MvoayK zC+Txixz/3o7odibtCs9SMDcFHNKfyvf7A== X-Google-Smtp-Source: APiQypI/+SgKj1ASs4nHy0fMhJDyL49PvevSzN/SjUq5X/q5cZuRG0tB4oRuTjqAwmCSrtaz2HbsSw== X-Received: by 2002:adf:df82:: with SMTP id z2mr385664wrl.58.1586629777241; Sat, 11 Apr 2020 11:29:37 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH for-5.0? 1/3] configure: Honour --disable-werror for Sphinx Date: Sat, 11 Apr 2020 19:29:32 +0100 Message-Id: <20200411182934.28678-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200411182934.28678-1-peter.maydell@linaro.org> References: <20200411182934.28678-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::430 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- 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=3Dyes fi =20 +# If we're making warnings fatal, apply this to Sphinx runs as well +sphinx_werror=3D"" +if test "$werror" =3D "yes"; then + sphinx_werror=3D"-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" "$TMP= DIR1/sphinx/out" >/dev/null 2>&1 + "$sphinx_build" $sphinx_werror -c "$source_path/docs" -b html "$TMPDIR= 1/sphinx" "$TMPDIR1/sphinx/out" >/dev/null 2>&1 } =20 # Check if tools are available to build documentation. @@ -7631,6 +7637,7 @@ echo "INSTALL_PROG=3D$install -c -m 0755" >> $config_= host_mak echo "INSTALL_LIB=3D$install -c -m 0644" >> $config_host_mak echo "PYTHON=3D$python" >> $config_host_mak echo "SPHINX_BUILD=3D$sphinx_build" >> $config_host_mak +echo "SPHINX_WERROR=3D$sphinx_werror" >> $config_host_mak echo "GENISOIMAGE=3D$genisoimage" >> $config_host_mak echo "CC=3D$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 =3D $(call quiet-command,CONFDIR=3D"$(qemu_confdir)" $(SPHINX= _BUILD) $(if $(V),,-q) -W -b $2 -D version=3D$(VERSION) -D release=3D"$(FUL= L_VERSION)" -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"= SPHINX","$(MANUAL_BUILDDIR)/$1") +build-manual =3D $(call quiet-command,CONFDIR=3D"$(qemu_confdir)" $(SPHINX= _BUILD) $(if $(V),,-q) $(SPHINX_WERROR) -b $2 -D version=3D$(VERSION) -D re= lease=3D"$(FULL_VERSION)" -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1 $(MANUAL_B= UILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1") # We assume all RST files in the manual's directory are used in it manual-deps =3D $(wildcard $(SRC_PATH)/docs/$1/*.rst $(SRC_PATH)/docs/$1/*= /*.rst) \ $(SRC_PATH)/docs/defs.rst.inc \ --=20 2.20.1