X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=doc%2FMakefile.local;h=730ad4fb5a7b433cc1bd85c1c59a8a4ba44ed32e;hb=95f0c59fe98b1404ca8a4042becf650aeb09b923;hp=651168f4d123ca13b7963aee4a550832c3272279;hpb=6682b4e686b7972883626c9b0f941ae4bf02dedb;p=notmuch diff --git a/doc/Makefile.local b/doc/Makefile.local index 651168f4..730ad4fb 100644 --- a/doc/Makefile.local +++ b/doc/Makefile.local @@ -1,14 +1,14 @@ -# -*- makefile -*- +# -*- makefile-gmake -*- dir := doc # You can set these variables from the command line. SPHINXOPTS := -q -SPHINXBUILD = HAVE_EMACS=${HAVE_EMACS} sphinx-build +SPHINXBUILD = env LD_LIBRARY_PATH=${NOTMUCH_BUILDDIR}/lib 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 @@ -28,38 +28,38 @@ MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES}) MAN1_TEXI := $(patsubst $(srcdir)/doc/man1/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN1_RST)) MAN5_TEXI := $(patsubst $(srcdir)/doc/man5/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN5_RST)) MAN7_TEXI := $(patsubst $(srcdir)/doc/man7/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN7_RST)) -INFO_TEXI_FILES := $(MAN1_TEXI) $(MAN5_TEXI) $(MAN7_TEXI) $(DOCBUILDDIR)/texinfo/notmuch-emacs.texi +INFO_TEXI_FILES := $(MAN1_TEXI) $(MAN5_TEXI) $(MAN7_TEXI) +ifeq ($(WITH_EMACS),1) + INFO_TEXI_FILES += $(DOCBUILDDIR)/texinfo/notmuch-emacs.texi +endif + INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info) -.PHONY: sphinx-html sphinx-texinfo sphinx-info +.PHONY: sphinx-html sphinx-texinfo sphinx-info doc-prereqs .PHONY: install-man build-man apidocs install-apidocs %.gz: % - rm -f $@ && gzip --stdout $^ > $@ + rm -f $@ && gzip --no-name --stdout $^ > $@ ifeq ($(WITH_EMACS),1) -$(DOCBUILDDIR)/.roff.stamp sphinx-html sphinx-texinfo: docstring.stamp +$(DOCBUILDDIR)/.roff.stamp $(DOCBUILDDIR)/.html.stamp $(DOCBUILDDIR)/.texi.stamp : 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 +ifeq ($(HAVE_PYTHON3_CFFI),1) +doc-prereqs: python-cffi-bindings +endif sphinx-html: $(DOCBUILDDIR)/.html.stamp -$(DOCBUILDDIR)/.html.stamp: $(ALL_RST_FILES) - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html +$(DOCBUILDDIR)/.html.stamp: $(ALL_RST_FILES) doc-prereqs + $(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 +$(DOCBUILDDIR)/.texi.stamp: $(ALL_RST_FILES) doc-prereqs + $(SPHINXBUILD) -b texinfo -d $(DOCBUILDDIR)/texinfo_doctrees $(ALLSPHINXOPTS) $(DOCBUILDDIR)/texinfo touch $@ sphinx-info: sphinx-texinfo @@ -75,7 +75,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}; \