From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 5D3DA6DE12B0 for ; Tue, 19 Mar 2019 12:02:00 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[DKIMWL_WL_MED=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qfnJ8iop5vrr for ; Tue, 19 Mar 2019 12:01:58 -0700 (PDT) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by arlo.cworth.org (Postfix) with ESMTPS id 2C3AF6DE12A8 for ; Tue, 19 Mar 2019 12:01:58 -0700 (PDT) Received: by mail-lj1-f176.google.com with SMTP id l7so45009ljg.6 for ; Tue, 19 Mar 2019 12:01:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Oo345Dv7Tu5Iz5Xou6ivsh1fzZ+jnbWmv7+mItq0DvA=; b=JnNX4WKOUZB6LQZhYCCdqcInow/uZ8mGdIjf14WyDBFoDDHbOIxP8XOxa5S8WpOf+O os2R3sn8qWFYslEtprXWz3ArMEKsUL5fIhZ6uhA/tpIlIaa5Wto4EzyGJrZsAEk8xCnj w8W5/iDdZErSuJSglrZKD26AvKKrenQAzwo1NumjzkCxKFyF9NEt1Ze/wpzW1OCK0o7w MT/UEyP97BgEope755SRTJDVIYn5Y79qLxFEmW3vGpkdm0xFhn7zjCrBLpLZdnYhOmwf FoJiuPdGQgbrilHFzkyy6FL46Msq2D3NERkM9F1hdjX0ZTRsV0QvPcciM4OmboHEFN1l hupA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Oo345Dv7Tu5Iz5Xou6ivsh1fzZ+jnbWmv7+mItq0DvA=; b=qH+wl+LxDwB5PrHb/lj++oPSA/cWBroPwFy8w+b99LtD+hZmLBI5gXR9mfAbWtVhOM x9wv6k8yqtrjWjKkkzEoa9mceMR5nRWw3t9Dgy8qHvpnprTCSZaEYYwni9KDXzdC/G8t MJ/YVt8Ji83pwl39yYFfsYkeOg3gSAw0dJuoySFL/J0atDrSRQvz5MrIpF44vmW1IUd2 EyRqQs0U1PeLCbcB5yVv2yVuxbQXVUlzdVdG0mtoEtRUyW1jPYQrrNz+SwGZUEqcLtQg cCTOjbMcWWv+68br5wNspavPnS9xIcK76tZ74SgNdhuX9A+LOhA6I1j96HvgxKi6iM9N QghA== X-Gm-Message-State: APjAAAW9kRgTnBrMLajwKFz/STqggzMSdxEzfPvurnw7ic3DGUlEAZYx YKhExRV5vPBzG3qMA8znZf/h9habz7gWXw== X-Google-Smtp-Source: APXvYqwwyLhGgOVd+LlEqhr2jXqif0+g4U/1hZ/9TE3k8aX6rTbUMh7LHP14MTu+nv1sN2WWObfNfQ== X-Received: by 2002:a2e:47c4:: with SMTP id u187mr14961160lja.10.1553022114724; Tue, 19 Mar 2019 12:01:54 -0700 (PDT) Received: from localhost (84-253-206-213.bb.dnainternet.fi. [84.253.206.213]) by smtp.gmail.com with ESMTPSA id k23sm2938151ljk.69.2019.03.19.12.01.53 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 19 Mar 2019 12:01:53 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH] doc: add support for adding configure options as Sphinx tags Date: Tue, 19 Mar 2019 21:01:46 +0200 Message-Id: <20190319190146.26155-1-jani@nikula.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Mar 2019 19:02:00 -0000 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 " for each make variable in TAGS that equals 1. +TAGS := HAVE_XAPIAN_FIELD_PROCESSOR HAVE_XAPIAN_COMPACT +TAGOPTS := $(patsubst %=1,-t %,$(filter %=1,$(foreach tag,$(TAGS),$(tag)=$(value $(tag))))) + # Internal variables. -ALLSPHINXOPTS := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(srcdir)/$(dir) +ALLSPHINXOPTS := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(TAGOPTS) $(srcdir)/$(dir) APIMAN := $(DOCBUILDDIR)/man/man3/notmuch.3 DOXYFILE := $(srcdir)/$(dir)/doxygen.cfg diff --git a/doc/man7/notmuch-search-terms.rst b/doc/man7/notmuch-search-terms.rst index f7a39ceb9df4..4840f03743aa 100644 --- a/doc/man7/notmuch-search-terms.rst +++ b/doc/man7/notmuch-search-terms.rst @@ -451,6 +451,14 @@ notmuch was built against a sufficiently recent version of Xapian by running % notmuch config get built_with.field_processor +.. only:: HAVE_XAPIAN_FIELD_PROCESSOR + + The documentation was built on a host with field processor support. + +.. only:: not HAVE_XAPIAN_FIELD_PROCESSOR + + The documentation was built on a host without field processor support. + Currently the following features require field processor support: - non-range date queries, e.g. "date:today" -- 2.20.1