From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0153AA04F9; Fri, 10 Jan 2020 16:51:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ECDE91EB49; Fri, 10 Jan 2020 16:51:34 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 4C7CC1EB45 for ; Fri, 10 Jan 2020 16:51:33 +0100 (CET) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jan 2020 07:51:31 -0800 X-IronPort-AV: E=Sophos;i="5.69,417,1571727600"; d="scan'208";a="216701953" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.26]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Jan 2020 07:51:30 -0800 Date: Fri, 10 Jan 2020 15:51:27 +0000 From: Bruce Richardson To: david.marchand@redhat.com, john.mcnamara@intel.com, bluca@debian.org Cc: dev@dpdk.org, aconole@redhat.com, thomas@monjalon.net Message-ID: <20200110155127.GA272@bricha3-MOBL.ger.corp.intel.com> References: <20200109115631.500056-1-bruce.richardson@intel.com> <20200109153112.501282-1-bruce.richardson@intel.com> <20200109153112.501282-6-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200109153112.501282-6-bruce.richardson@intel.com> User-Agent: Mutt/1.12.1 (2019-06-15) Subject: Re: [dpdk-dev] [PATCH v3 5/6] doc/guides: rebuild with meson whenever a file changes 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" On Thu, Jan 09, 2020 at 03:31:11PM +0000, Bruce Richardson wrote: > Add proper support for calling sphinx whenever a file in the doc > directory changes. This is accomplished by using a wrapper script > for sphinx, which runs sphinx but also emits a gcc-format dependency > file listing all the doc files. This is used by ninja so that any > change to the doc files triggers a rebuild of the docs. > > Signed-off-by: Bruce Richardson > Acked-by: Aaron Conole > --- > buildtools/call-sphinx-build.py | 23 +++++++++++++++++++++++ > buildtools/meson.build | 6 ++++-- > doc/guides/meson.build | 22 ++++++++-------------- > 3 files changed, 35 insertions(+), 16 deletions(-) > create mode 100755 buildtools/call-sphinx-build.py > > diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py > new file mode 100755 > index 000000000..80bda2661 > --- /dev/null > +++ b/buildtools/call-sphinx-build.py > @@ -0,0 +1,23 @@ > +#! /usr/bin/env python3 > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright(c) 2019 Intel Corporation > +# > + > +import sys > +import os > +from os.path import join > +from subprocess import run > + > +(sphinx, src, dst) = sys.argv[1:] # assign parameters to variables > + > +# find all the files sphinx will process so we can write them as dependencies > +srcfiles = [] > +for root, dirs, files in os.walk(src): > + srcfiles.extend([join(root, f) for f in files]) > + > +# run sphinx, putting the html output in a "html" directory > +run([sphinx, '-j', 'auto', '-b', 'html', src, join(dst, 'html')], check=True) > + Looking in travis, it appears that sphinx there is too old to support the "-j auto" flag, so I'll do a new revision to fix that. /Bruce