From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 7EE7F6DE0F4C for ; Fri, 31 May 2019 19:25:03 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.044 X-Spam-Level: X-Spam-Status: No, score=-0.044 tagged_above=-999 required=5 tests=[AWL=-0.043, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07IAPKwxf6vv for ; Fri, 31 May 2019 19:25:02 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 7F5FB6DE0F18 for ; Fri, 31 May 2019 19:25:02 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1hWthd-0004X5-0n; Fri, 31 May 2019 22:25:01 -0400 Received: (nullmailer pid 23613 invoked by uid 1000); Sat, 01 Jun 2019 02:25:11 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH] doc: use separate doctrees for distinct builders Date: Fri, 31 May 2019 23:24:52 -0300 Message-Id: <20190601022452.23562-1-david@tethera.net> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jun 2019 02:25:03 -0000 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