From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org,
timao@redhat.com
Subject: [PATCH 1/5] docs: Pass disabled configure options to sphinx
Date: Mon, 31 Jan 2022 18:04:07 +0100 [thread overview]
Message-ID: <20220131170411.125198-2-kwolf@redhat.com> (raw)
In-Reply-To: <20220131170411.125198-1-kwolf@redhat.com>
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.
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
next prev parent reply other threads:[~2022-01-31 17:16 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 ` Kevin Wolf [this message]
2022-01-31 17:53 ` [PATCH 1/5] docs: Pass disabled configure options to sphinx Daniel P. Berrangé
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=20220131170411.125198-2-kwolf@redhat.com \
--to=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).