qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org,
	qemu-block@nongnu.org, timao@redhat.com
Subject: Re: [PATCH 1/5] docs: Pass disabled configure options to sphinx
Date: Mon, 31 Jan 2022 17:53:39 +0000	[thread overview]
Message-ID: <YfgiIwTMISic8tEk@redhat.com> (raw)
In-Reply-To: <20220131170411.125198-2-kwolf@redhat.com>

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	other threads:[~2022-01-31 18:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31 17:04 [PATCH 0/5] docs: Don't document disabled features Kevin Wolf
2022-01-31 17:04 ` [PATCH 1/5] docs: Pass disabled configure options to sphinx Kevin Wolf
2022-01-31 17:53   ` Daniel P. Berrangé [this message]
2022-01-31 17:04 ` [PATCH 2/5] docs: Only mention iscsi in the man page when available Kevin Wolf
2022-01-31 18:57   ` Peter Maydell
2022-02-01  8:40     ` Kevin Wolf
2022-01-31 17:04 ` [PATCH 3/5] docs: Only mention ssh " Kevin Wolf
2022-01-31 17:04 ` [PATCH 4/5] docs: Only mention curl " Kevin Wolf
2022-01-31 17:04 ` [PATCH 5/5] docs: Only mention gluster " Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YfgiIwTMISic8tEk@redhat.com \
    --to=berrange@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=timao@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).