This will still generate a warning about an excluded document in the
toctree, but it cuts down on the noise quite a lot.
# You can set these variables from the command line.
SPHINXOPTS := -q
# You can set these variables from the command line.
SPHINXOPTS := -q
-SPHINXBUILD = sphinx-build
+SPHINXBUILD = HAVE_EMACS=${HAVE_EMACS} sphinx-build
DOCBUILDDIR := $(dir)/_build
# Internal variables.
DOCBUILDDIR := $(dir)/_build
# Internal variables.
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# directories to ignore when looking for source files.
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.
pygments_style = 'sphinx'
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'