X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=doc%2FMakefile.local;h=fada1fa29a294c55debbbc076f743afeec2f1f50;hp=eec9c228379a59688a2d9c54863c81c16e600950;hb=f0399db513ce2f12b94cd8aefe54be408d39fb62;hpb=0601d2337e05e6360a918244472f92db1c001fc5 diff --git a/doc/Makefile.local b/doc/Makefile.local index eec9c228..fada1fa2 100644 --- a/doc/Makefile.local +++ b/doc/Makefile.local @@ -16,6 +16,7 @@ MAN1_RST := $(wildcard $(srcdir)/doc/man1/*.rst) MAN5_RST := $(wildcard $(srcdir)/doc/man5/*.rst) MAN7_RST := $(wildcard $(srcdir)/doc/man7/*.rst) MAN_RST_FILES := $(MAN1_RST) $(MAN5_RST) $(MAN7_RST) +ALL_RST_FILES := $(MAN_RST_FILES) $(srcdir)/doc/notmuch-emacs.rst MAN1_ROFF := $(patsubst $(srcdir)/doc/%,$(DOCBUILDDIR)/man/%,$(MAN1_RST:.rst=.1)) MAN5_ROFF := $(patsubst $(srcdir)/doc/%,$(DOCBUILDDIR)/man/%,$(MAN5_RST:.rst=.5)) @@ -38,17 +39,28 @@ 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 -sphinx-texinfo: +sphinx-texinfo: $(DOCBUILDDIR)/.texi.stamp + +$(DOCBUILDDIR)/.texi.stamp: $(ALL_RST_FILES) $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(DOCBUILDDIR)/texinfo + touch $@ 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. @@ -129,5 +141,5 @@ $(dir)/config.dox: version.stamp echo "PROJECT_NAME = \"Notmuch $(VERSION)\"" > $@ echo "INPUT=${srcdir}/lib/notmuch.h" >> $@ -CLEAN := $(CLEAN) $(DOCBUILDDIR) $(DOCBUILDDIR)/.roff.stamp +CLEAN := $(CLEAN) $(DOCBUILDDIR) $(DOCBUILDDIR)/.roff.stamp $(DOCBUILDDIR)/.texi.stamp CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES) $(dir)/conf.pyc $(dir)/config.dox