From patchwork Fri Jan 17 10:48:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 64829 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3FB23A051A; Fri, 17 Jan 2020 11:51:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7FFA51D426; Fri, 17 Jan 2020 11:51:20 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 76C1B1D425 for ; Fri, 17 Jan 2020 11:51:19 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2020 02:51:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,329,1574150400"; d="scan'208";a="257757557" Received: from silpixa00399126.ir.intel.com ([10.237.222.218]) by fmsmga002.fm.intel.com with ESMTP; 17 Jan 2020 02:51:17 -0800 From: Bruce Richardson To: david.marchand@redhat.com Cc: dev@dpdk.org, Bruce Richardson Date: Fri, 17 Jan 2020 10:48:19 +0000 Message-Id: <20200117104820.71403-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 1/2] doc: fix doc build when sphinx reports version to stderr X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When sphinx-build reports its version information to stderr rather than stdout, the wrapper script misses it, and then fails to run. We can fix this by redirecting stderr to stdout for the version query call. Fixes: f5ab2074cfba ("doc: rebuild with meson whenever a file changes") Signed-off-by: Bruce Richardson --- buildtools/call-sphinx-build.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py index b9a3994e1..85c9e0156 100755 --- a/buildtools/call-sphinx-build.py +++ b/buildtools/call-sphinx-build.py @@ -6,13 +6,14 @@ import sys import os from os.path import join -from subprocess import run, PIPE +from subprocess import run, PIPE, STDOUT from distutils.version import StrictVersion (sphinx, 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).stdout.decode().split()[-1] +ver = run([sphinx, '--version'], stdout=PIPE, + stderr=STDOUT).stdout.decode().split()[-1] sphinx_cmd = [sphinx] if StrictVersion(ver) >= StrictVersion('1.7'): sphinx_cmd += ['-j', 'auto'] From patchwork Fri Jan 17 10:48:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 64830 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 663E4A051A; Fri, 17 Jan 2020 11:51:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 51EE81D450; Fri, 17 Jan 2020 11:51:27 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 059421D449 for ; Fri, 17 Jan 2020 11:51:25 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2020 02:51:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,329,1574150400"; d="scan'208";a="257757576" Received: from silpixa00399126.ir.intel.com ([10.237.222.218]) by fmsmga002.fm.intel.com with ESMTP; 17 Jan 2020 02:51:24 -0800 From: Bruce Richardson To: david.marchand@redhat.com Cc: dev@dpdk.org, Bruce Richardson Date: Fri, 17 Jan 2020 10:48:20 +0000 Message-Id: <20200117104820.71403-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200117104820.71403-1-bruce.richardson@intel.com> References: <20200117104820.71403-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 2/2] doc: pass "werror" setting through to doc build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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'),