From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [PATCH] doc: use separate doctrees for distinct builders
Date: Fri, 31 May 2019 23:24:52 -0300 [thread overview]
Message-ID: <20190601022452.23562-1-david@tethera.net> (raw)
It seems our previous attempt with order-only targets was not
sufficient to avoid problems with sphinx-builds doctree cache [0].
Looking around at other people's approaches [1], using seperate
doctrees was suggested. I guess there might be a slight loss of
efficiency, but it seems more robust.
[0]: build failures were first noticed in debian experimental, but I was able to duplicate it in
my usual build environment about 1 in 8 builds.
[1]: in particular
https://salsa.debian.org/mpd-team/mpc/commit/9e3fc1657d043d75755993846c93f7700b97f907
---
doc/Makefile.local | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/doc/Makefile.local b/doc/Makefile.local
index 651168f4..719172fe 100644
--- a/doc/Makefile.local
+++ b/doc/Makefile.local
@@ -8,7 +8,7 @@ SPHINXBUILD = HAVE_EMACS=${HAVE_EMACS} sphinx-build
DOCBUILDDIR := $(dir)/_build
# Internal variables.
-ALLSPHINXOPTS := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(srcdir)/$(dir)
+ALLSPHINXOPTS := $(SPHINXOPTS) $(srcdir)/$(dir)
APIMAN := $(DOCBUILDDIR)/man/man3/notmuch.3
DOXYFILE := $(srcdir)/$(dir)/doxygen.cfg
@@ -42,24 +42,16 @@ ifeq ($(WITH_EMACS),1)
$(DOCBUILDDIR)/.roff.stamp sphinx-html sphinx-texinfo: docstring.stamp
endif
-# Sequentialize the calls to sphinx-build to avoid races with
-# reading/writing cached state. This uses GNU make specific
-# "order-only" prerequisites.
-
-sphinx-html: | $(DOCBUILDDIR)/.roff.stamp
-sphinx-texinfo: | sphinx-html
-sphinx-info: | sphinx-texinfo
-
sphinx-html: $(DOCBUILDDIR)/.html.stamp
$(DOCBUILDDIR)/.html.stamp: $(ALL_RST_FILES)
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html
+ $(SPHINXBUILD) -b html -d $(DOCBUILDDIR)/html_doctrees $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html
touch $@
sphinx-texinfo: $(DOCBUILDDIR)/.texi.stamp
$(DOCBUILDDIR)/.texi.stamp: $(ALL_RST_FILES)
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(DOCBUILDDIR)/texinfo
+ $(SPHINXBUILD) -b texinfo -d $(DOCBUILDDIR)/texinfo_doctrees $(ALLSPHINXOPTS) $(DOCBUILDDIR)/texinfo
touch $@
sphinx-info: sphinx-texinfo
@@ -75,7 +67,7 @@ ${MAN_ROFF_FILES}: $(DOCBUILDDIR)/.roff.stamp
# instance of this recipe for each roff file.
$(DOCBUILDDIR)/.roff.stamp: ${MAN_RST_FILES}
ifeq ($(HAVE_SPHINX),1)
- $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(DOCBUILDDIR)/man
+ $(SPHINXBUILD) -b man -d $(DOCBUILDDIR)/man_doctrees $(ALLSPHINXOPTS) $(DOCBUILDDIR)/man
for section in 1 5 7; do \
mkdir -p $(DOCBUILDDIR)/man/man$${section}; \
mv $(DOCBUILDDIR)/man/*.$${section} $(DOCBUILDDIR)/man/man$${section}; \
--
2.20.1
next reply other threads:[~2019-06-01 2:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-01 2:24 David Bremner [this message]
2019-06-02 20:54 ` [PATCH] doc: use separate doctrees for distinct builders Tomi Ollila
2019-06-03 11:33 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190601022452.23562-1-david@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).