[PATCH] doc: add support for adding configure options as Sphinx tags

David Bremner david at tethera.net
Tue Mar 19 16:41:33 PDT 2019


Jani Nikula <jani at nikula.org> writes:

> Add the configure options specified in $(TAGS) that equal 1 as tags on
> the Sphinx command line using the -t option. The tags may be used to
> conditionally include documentation using the Sphinx "only" directive
> [1].
>
> As an example, indicate in the documentation whether the Xapian field
> processor is likely to be available (assuming the notmuch binary was
> built in the same environment as the documentation).
>
> [1] http://www.sphinx-doc.org/en/stable/markup/misc.html#including-content-based-on-tags
>
> ---
>
> This is something I wrote two years ago, ISTR David asking about
> something like this on IRC, but I've already forgotten what it was
> about...
> ---
>  doc/Makefile.local                | 7 ++++++-
>  doc/man7/notmuch-search-terms.rst | 8 ++++++++
>  2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/doc/Makefile.local b/doc/Makefile.local
> index bab3d0d286ce..95df9ae82b4f 100644
> --- a/doc/Makefile.local
> +++ b/doc/Makefile.local
> @@ -7,8 +7,13 @@ SPHINXOPTS    := -q
>  SPHINXBUILD   = sphinx-build
>  DOCBUILDDIR      := $(dir)/_build
>  
> +# Configure options to be added as Sphinx tags.
> +# Add "-t <tag>" for each make variable in TAGS that equals 1.
> +TAGS := HAVE_XAPIAN_FIELD_PROCESSOR HAVE_XAPIAN_COMPACT

Is there a good reason TAGS not defined in Makefile.config? Or just a
lack of tuits?

d


More information about the notmuch mailing list