From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5ECC4C282DD for ; Fri, 10 Jan 2020 15:51:36 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 16B1920721 for ; Fri, 10 Jan 2020 15:51:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16B1920721 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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