]> git.notmuchmail.org Git - notmuch/blobdiff - doc/Makefile.local
doc: Clean up warnings when building notmuch-emacs docs
[notmuch] / doc / Makefile.local
index eec9c228379a59688a2d9c54863c81c16e600950..dfe62295d0965fed478a75d06361ca123ae934bc 100644 (file)
@@ -38,9 +38,17 @@ INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info)
        rm -f $@ && gzip --stdout $^ > $@
 
 ifeq ($(WITH_EMACS),1)
-sphinx-html sphinx-texinfo: docstring.stamp
+$(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:
        $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html
 
@@ -48,7 +56,7 @@ sphinx-texinfo:
        $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(DOCBUILDDIR)/texinfo
 
 sphinx-info: sphinx-texinfo
-       make -C $(DOCBUILDDIR)/texinfo info
+       $(MAKE) -C $(DOCBUILDDIR)/texinfo info
 
 # Use the man page converter that is available. We should never depend
 # on MAN_ROFF_FILES if a converter is not available.