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 EF9526DE1F91 for ; Sun, 26 Feb 2017 12:57:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.517 X-Spam-Level: X-Spam-Status: No, score=-0.517 tagged_above=-999 required=5 tests=[AWL=0.203, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] 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 PDE3Sm8n8j-A for ; Sun, 26 Feb 2017 12:57:03 -0800 (PST) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) by arlo.cworth.org (Postfix) with ESMTPS id 31EEB6DE1F8E for ; Sun, 26 Feb 2017 12:57:03 -0800 (PST) Received: by mail-lf0-f54.google.com with SMTP id k202so12366746lfe.1 for ; Sun, 26 Feb 2017 12:57:03 -0800 (PST) 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; bh=6zkmyTQh4Fw7pN1wFXhim5wihfKhDAB5MpkUcJ7ly90=; b=Csx0CxIu8wtRoWU9XhZdW7i3CLJu4Orc245pgaAfN1zJpYaS4Y3gdhACM76ju8lpOZ WNXLQKw3BQhnHVvLzoe4pK/QnvHUGbXxj6Ng5nZif6WQSwTclvj1826oNxbWROEP/lEo wOrH9T8I8hXw7R8SL3M+M8eRu+4dMfq7lbpR+YiIYPsqkHNjkXJjzlNi8eG5PYuHSFIy AYe3YMRVYLsssQrBskjyChSN6yPP1saSt7N17vdFzNNWb4iY1kWQmJscLtNjP5TO1M0T t+FY/4NLcS9Fdo6INSncKXpbCGxc9B7s2u612b3pb3klCMJanVNMhq0dzBI1GC0Fae1B YqYw== 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; bh=6zkmyTQh4Fw7pN1wFXhim5wihfKhDAB5MpkUcJ7ly90=; b=rgWYCADPa5c7fkQ8eFZFja1oICuyC39Du2TfWVXq1HE8TzaUXDX9XWuOKorymQ86LN WvgrVFuIrVOflD6fWU4Oh4AxCexDIhoMm82s9ezdNCjWx7cQUW8BACazZnsa+9cbBq4G xU0YIUv9/GHNTTnr3zPF0eJt3b1HOHiKynT70WjCns2qCNS+Wpy0LHq8eMlBulP0Px5h 5kg3806RjpRVycQ3h9o2EMtVMeVvzL1Ozn6SpmQUDpiuNl+WLif1Z/226ISfvpLMxh1p AGQ88bM88w0F5GPK6/fF2ySCQ+o3nQTZHrukfmH2R6BCLGmbnd2p4pBIKB7Uz+3ZD2ms cBFQ== X-Gm-Message-State: AMke39lEf3sLXyXXKuB8UcMl2aUmq/CusddWbSsYM6jhc0OWr/mSfrWb4EywTyJ4nPwovw== X-Received: by 10.25.160.1 with SMTP id j1mr1029081lfe.44.1488142620897; Sun, 26 Feb 2017 12:57:00 -0800 (PST) Received: from localhost (mobile-access-bcee80-14.dhcp.inet.fi. [188.238.128.14]) by smtp.gmail.com with ESMTPSA id 13sm10316325ljb.57.2017.02.26.12.56.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Feb 2017 12:57:00 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [RFC PATCH] doc: add support for adding configure options as Sphinx tags Date: Sun, 26 Feb 2017 22:56:57 +0200 Message-Id: <20170226205657.5512-1-jani@nikula.org> X-Mailer: git-send-email 2.11.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Sun, 26 Feb 2017 20:57:05 -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 --- Just an idea, not sure if it makes sense. --- 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 c6f05ca879c0..24fc457cab14 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 de93d7332472..0a2f74ce57a6 100644 --- a/doc/man7/notmuch-search-terms.rst +++ b/doc/man7/notmuch-search-terms.rst @@ -392,6 +392,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.11.0