unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org
Subject: Re: [PATCH] doc: Fix parallel build of roff files
Date: Fri, 18 Apr 2014 10:13:23 +0300	[thread overview]
Message-ID: <m2wqen3yb0.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <1397766897-14475-1-git-send-email-amdragon@mit.edu>

On Thu, Apr 17 2014, Austin Clements <amdragon@MIT.EDU> 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

  reply	other threads:[~2014-04-18  7:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-17 20:34 [PATCH] doc: Fix parallel build of roff files Austin Clements
2014-04-18  7:13 ` Tomi Ollila [this message]
2014-04-18 21:08 ` David Bremner
2014-05-10 15:18 ` W. Trevor King
2014-05-10 16:02   ` Austin Clements

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2wqen3yb0.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=amdragon@MIT.EDU \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).