doc: exclude notmuch-emacs.rst if emacs is not present.

This will still generate a warning about an excluded document in the
toctree, but it cuts down on the noise quite a lot.
This commit is contained in:
David Bremner 2019-04-21 20:41:34 -03:00
parent e4a8d6e2a4
commit 40b025c5f1
2 changed files with 6 additions and 1 deletions

View file

@ -4,7 +4,7 @@ dir := doc
# You can set these variables from the command line. # You can set these variables from the command line.
SPHINXOPTS := -q SPHINXOPTS := -q
SPHINXBUILD = sphinx-build SPHINXBUILD = HAVE_EMACS=${HAVE_EMACS} sphinx-build
DOCBUILDDIR := $(dir)/_build DOCBUILDDIR := $(dir)/_build
# Internal variables. # Internal variables.

View file

@ -29,6 +29,11 @@ release = version
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
exclude_patterns = ['_build'] exclude_patterns = ['_build']
# If we don't have emacs, don't build the notmuch-emacs docs, as they need
# emacs to generate the docstring include files
if os.environ.get('HAVE_EMACS') != '1':
exclude_patterns.append('notmuch-emacs.rst')
# The name of the Pygments (syntax highlighting) style to use. # The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx' pygments_style = 'sphinx'