]> git.cworth.org Git - notmuch/commitdiff
doc: sequentialize calls to sphinx-build
authorDavid Bremner <david@tethera.net>
Sun, 3 Mar 2019 03:30:59 +0000 (23:30 -0400)
committerDavid Bremner <david@tethera.net>
Wed, 6 Mar 2019 01:46:41 +0000 (21:46 -0400)
In certain conditions the parallel calls to sphinx-build could
collide, yielding a crash like

Exception occurred:
  File "/usr/lib/python3/dist-packages/sphinx/environment.py", line 1261, in get_doctree
    doctree = pickle.load(f)
EOFError: Ran out of input

doc/Makefile.local

index 16459e3544c2d7d668691ad89e3f20457dcf77b3..cb0f1f6488f6d9cbe0e3e8d345c5d90053c2de9c 100644 (file)
@@ -37,6 +37,14 @@ INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info)
 %.gz: %
        rm -f $@ && gzip --stdout $^ > $@
 
+# 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:
        $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html