From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luca Boccassi Subject: Re: [PATCH 4/4] build: generate API documentation with Meson Date: Fri, 07 Sep 2018 17:56:00 +0100 Message-ID: <1536339360.12545.17.camel@debian.org> References: <20180831182055.30772-1-bluca@debian.org> <20180831182055.30772-5-bluca@debian.org> <20180907163139.GB24984@bricha3-MOBL.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, john.mcnamara@intel.com, marko.kovacevic@intel.com, thomas@monjalon.net To: Bruce Richardson Return-path: Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 8D1C756A3 for ; Fri, 7 Sep 2018 18:56:02 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id z96-v6so15625881wrb.8 for ; Fri, 07 Sep 2018 09:56:02 -0700 (PDT) In-Reply-To: <20180907163139.GB24984@bricha3-MOBL.ger.corp.intel.com> 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 Fri, 2018-09-07 at 17:31 +0100, Bruce Richardson wrote: > On Fri, Aug 31, 2018 at 07:20:55PM +0100, Luca Boccassi wrote: > > Both a configuration-time "enable_docs" boolean option and an > > optional > > 'ninja doc' target are available. Note that due to a Meson bug for > > now > > the latter will only build, but not install the files. > >=20 > > Signed-off-by: Luca Boccassi > > --- > > =C2=A0doc/api/generate_doxygen.sh | 10 ++++++++ > > =C2=A0doc/api/meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0| 51 > > +++++++++++++++++++++++++++++++++++++ > > =C2=A0doc/build-sdk-meson.txt=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A0=C2= =A02 ++ > > =C2=A0doc/meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A0=C2=A04 +++ > > =C2=A0meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A0=C2=A03 +++ > > =C2=A0meson_options.txt=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0|=C2=A0=C2=A02 ++ > > =C2=A06 files changed, 72 insertions(+) > > =C2=A0create mode 100755 doc/api/generate_doxygen.sh > > =C2=A0create mode 100644 doc/api/meson.build > > =C2=A0create mode 100644 doc/meson.build > >=20 > > diff --git a/doc/api/generate_doxygen.sh > > b/doc/api/generate_doxygen.sh > > new file mode 100755 > > index 0000000000..ab57660958 > > --- /dev/null > > +++ b/doc/api/generate_doxygen.sh > > @@ -0,0 +1,10 @@ > > +#! /bin/sh -e > > +# SPDX-License-Identifier: BSD-3-Clause > > +# Copyright 2018 Luca Boccassi > > + > > +DOXYCONF=3D$1 > > +OUTDIR=3D$2 > > +SCRIPTCSS=3D$3 > > + > > +doxygen "${DOXYCONF}" > > +"${SCRIPTCSS}" "${OUTDIR}"/doxygen.css > > diff --git a/doc/api/meson.build b/doc/api/meson.build > > new file mode 100644 > > index 0000000000..e44963e4a9 > > --- /dev/null > > +++ b/doc/api/meson.build > > @@ -0,0 +1,51 @@ > > +# SPDX-License-Identifier: BSD-3-Clause > > +# Copyright(c) 2018 Luca Boccassi > > + > > +# due to the CSS customisation script, which needs to run on a > > file that > > +# is in a subdirectory that is created at build time and thus it > > cannot > > +# be an individual custom_target, we need to wrap the doxygen call > > in a > > +# script to run the CSS modification afterwards > > +generate_doxygen =3D find_program('generate_doxygen.sh') > > +generate_examples =3D find_program('generate_examples.sh') > > +generate_css =3D find_program('doxy-html-custom.sh') > > +doxygen =3D find_program('doxygen') >=20 > This needs to be inside a conditional if we are not building docs. > Otherwise overall build will error out if doxygen is missing - even > if > unused. >=20 > /Bruce Good point, forgot about that, done in v2 --=20 Kind regards, Luca Boccassi