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. > > > > Signed-off-by: Luca Boccassi <bl...@debian.org> > > --- > > doc/api/generate_doxygen.sh | 10 ++++++++ > > doc/api/meson.build | 51 > > +++++++++++++++++++++++++++++++++++++ > > doc/build-sdk-meson.txt | 2 ++ > > doc/meson.build | 4 +++ > > meson.build | 3 +++ > > meson_options.txt | 2 ++ > > 6 files changed, 72 insertions(+) > > create mode 100755 doc/api/generate_doxygen.sh > > create mode 100644 doc/api/meson.build > > create mode 100644 doc/meson.build > > > > 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 <bl...@debian.org> > > + > > +DOXYCONF=$1 > > +OUTDIR=$2 > > +SCRIPTCSS=$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 <bl...@debian.org> > > + > > +# 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 = find_program('generate_doxygen.sh') > > +generate_examples = find_program('generate_examples.sh') > > +generate_css = find_program('doxy-html-custom.sh') > > +doxygen = find_program('doxygen') > > 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. > > /Bruce
Good point, forgot about that, done in v2 -- Kind regards, Luca Boccassi