From: Tomi Ollila Date: Fri, 18 Apr 2014 07:13:23 +0000 (+0300) Subject: Re: [PATCH] doc: Fix parallel build of roff files X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c94d6e0944ed7dda861829349b72d2a60fdcd098;p=notmuch-archives.git Re: [PATCH] doc: Fix parallel build of roff files --- diff --git a/50/cf328889383d322d8dedd7e5e3269405520033 b/50/cf328889383d322d8dedd7e5e3269405520033 new file mode 100644 index 000000000..b1bca340c --- /dev/null +++ b/50/cf328889383d322d8dedd7e5e3269405520033 @@ -0,0 +1,107 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 95105431FBD + for ; Fri, 18 Apr 2014 00:13:39 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id NItDBZ653P6o for ; + Fri, 18 Apr 2014 00:13:31 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 7650F431FAE + for ; Fri, 18 Apr 2014 00:13:31 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 13A4610008F; + Fri, 18 Apr 2014 10:13:24 +0300 (EEST) +From: Tomi Ollila +To: Austin Clements , notmuch@notmuchmail.org +Subject: Re: [PATCH] doc: Fix parallel build of roff files +In-Reply-To: <1397766897-14475-1-git-send-email-amdragon@mit.edu> +References: <1397766897-14475-1-git-send-email-amdragon@mit.edu> +User-Agent: Notmuch/0.17+201~g56da2d6 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Fri, 18 Apr 2014 07:13:39 -0000 + +On Thu, Apr 17 2014, Austin Clements wrote: + +> The roff build rule builds all of the roff files in a single command. +> Previously, this was expressed as a multi-target rule, but since this +> is equivalent to specifying a copy of the rule for each target, make +> -jN could start up to N parallel instances of this command. Fix this +> by bottlenecking this rule through a single stamp file. +> +> This also removes the unused man.stamp from CLEAN. +> --- +> doc/Makefile.local | 11 +++++++++-- +> 1 file changed, 9 insertions(+), 2 deletions(-) +> +> diff --git a/doc/Makefile.local b/doc/Makefile.local +> index 0980c71..5cf140d 100644 +> --- a/doc/Makefile.local +> +++ b/doc/Makefile.local +> @@ -35,7 +35,13 @@ MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES}) +> +> # Use the man page converter that is available. We should never depend +> # on MAN_ROFF_FILES if a converter is not available. +> -${MAN_ROFF_FILES}: ${MAN_RST_FILES} +> +${MAN_ROFF_FILES}: $(DOCBUILDDIR)/.roff.stamp +> + +> +# By using $(DOCBUILDDIR)/roff.stamp instead of ${MAN_ROFF_FILES}, we +> +# convey to make that a single invocation of this receipe builds all + +LGTM. This 'receipe' could be amended to recipe(?:) + +> +# of the roff files. This prevents parallel make from starting an +> +# instance of this recipe for each roff file. +> +$(DOCBUILDDIR)/.roff.stamp: ${MAN_RST_FILES} +> ifeq ($(HAVE_SPHINX),1) +> $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(DOCBUILDDIR)/man +> for section in 1 5 7; do \ +> @@ -48,6 +54,7 @@ else +> @echo "Fatal: build dependency fail." +> @false +> endif +> + touch ${MAN_ROFF_FILES} $@ +> +> # Do not try to build or install man pages if a man page converter is +> # not available. +> @@ -70,5 +77,5 @@ endif +> $(dir)/docdeps.mk: $(dir)/conf.py $(dir)/mkdocdeps.py +> $(mkdocdeps) $(srcdir)/doc $(DOCBUILDDIR) $@ +> +> -CLEAN := $(CLEAN) $(DOCBUILDDIR) $(dir)/docdeps.mk $(dir)/man.stamp +> +CLEAN := $(CLEAN) $(DOCBUILDDIR) $(dir)/docdeps.mk $(DOCBUILDDIR)/.roff.stamp +> CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES) +> -- +> 1.9.1 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch