qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/5] docs: Pass disabled configure options to sphinx


From: Daniel P . Berrangé
Subject: Re: [PATCH 1/5] docs: Pass disabled configure options to sphinx
Date: Mon, 31 Jan 2022 17:53:39 +0000
User-agent: Mutt/2.1.5 (2021-12-30)

On Mon, Jan 31, 2022 at 06:04:07PM +0100, Kevin Wolf wrote:
> Man pages and other documentation should only contain things that are
> actually available in this build. In order to conditionally build
> documentation depending on the build configuration, pass the
> configuration to sphinx as tags.
> 
> The tags are negative so that building documentation from outside of
> meson (in particular for things like readthedocs) without any tags set
> results in the full documentation rather than disabling everything that
> is optional.

IMHO if we're building in upstream CI we should have a way to
explicitly force inclusion of /all/ docs, because we don't
want docs published from CI to be missing features just because
we happen to not have the deps enabled.

> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  docs/meson.build | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/docs/meson.build b/docs/meson.build
> index 57b28a3146..3220da4c15 100644
> --- a/docs/meson.build
> +++ b/docs/meson.build
> @@ -37,6 +37,16 @@ endif
>  if build_docs
>    SPHINX_ARGS += ['-Dversion=' + meson.project_version(), '-Drelease=' + 
> config_host['PKGVERSION']]
>  
> +  foreach key: config_host_data.keys()
> +    if not key.startswith('CONFIG_')
> +      continue
> +    endif
> +    if '@0@'.format(config_host_data.get(key)) in ['0', 'false']
> +      tag = 'DISABLE_' + key.substring(7)
> +      SPHINX_ARGS += ['-t', tag]
> +    endif
> +  endforeach
> +
>    have_ga = have_tools and config_host.has_key('CONFIG_GUEST_AGENT')
>  
>    man_pages = {
> -- 
> 2.31.1
> 
> 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]