From: Austin Clements Date: Thu, 17 Apr 2014 20:34:57 +0000 (+2000) Subject: [PATCH] doc: Fix parallel build of roff files X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5c140c0e9f5d4d02d882a9c1d8b193c8ea18846b;p=notmuch-archives.git [PATCH] doc: Fix parallel build of roff files --- diff --git a/74/63cb35280c99ffdf7176fd593f3d033e7864f7 b/74/63cb35280c99ffdf7176fd593f3d033e7864f7 new file mode 100644 index 000000000..66f6068ad --- /dev/null +++ b/74/63cb35280c99ffdf7176fd593f3d033e7864f7 @@ -0,0 +1,121 @@ +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 CD143431FAF + for ; Thu, 17 Apr 2014 13:35:17 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 Jqs8mglQ1P4p for ; + Thu, 17 Apr 2014 13:35:11 -0700 (PDT) +Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu + [18.7.68.37]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id F0F44431FAE + for ; Thu, 17 Apr 2014 13:35:10 -0700 (PDT) +X-AuditID: 12074425-f79906d000000cf9-7c-53503afd5ddb +Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) + (using TLS with cipher AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP + id DA.2C.03321.DFA30535; Thu, 17 Apr 2014 16:35:09 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id s3HKZ3u7025473; + Thu, 17 Apr 2014 16:35:04 -0400 +Received: from drake.dyndns.org (26-4-182.dynamic.csail.mit.edu [18.26.4.182]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s3HKZ14f006013 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Thu, 17 Apr 2014 16:35:03 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) + id 1Wat1R-0003n7-FQ; Thu, 17 Apr 2014 16:35:01 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH] doc: Fix parallel build of roff files +Date: Thu, 17 Apr 2014 16:34:57 -0400 +Message-Id: <1397766897-14475-1-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 1.9.1 +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFlrPIsWRmVeSWpSXmKPExsUixG6novvXKiDY4OpnG4sbrd2MFtdvzmR2 + YPJ4tuoWs8eWQ++ZA5iiuGxSUnMyy1KL9O0SuDKenFvCVPCOr+LS7TtsDYyLeboYOTkkBEwk + vt5qYoKwxSQu3FvP1sXIxSEkMJtJYuKxGYwQzkZGifOnetm7GDmAnCNMEht0IeJzGSVe717D + DtLNJqAhsW3/ckYQW0RAWmLn3dmsIDazgKXE1a/tTCC9wgJmEn+nioKEWQRUJTpXzgQr5xVw + kHh34T4bxBFyEiePTWadwMi7gJFhFaNsSm6Vbm5iZk5xarJucXJiXl5qka6FXm5miV5qSukm + RnBYuKjuYJxwSOkQowAHoxIPr8YP/2Ah1sSy4srcQ4ySHExKorzqlgHBQnxJ+SmVGYnFGfFF + pTmpxYcYJTiYlUR4TVWBcrwpiZVVqUX5MClpDhYlcd631lbBQgLpiSWp2ampBalFMFkZDg4l + Cd5nIEMFi1LTUyvSMnNKENJMHJwgw3mAhq8BqeEtLkjMLc5Mh8ifYtTlWPBjTQuTEEtefl6q + lDjvZgugIgGQoozSPLg5sHh+xSgO9JYw72GQUTzAVAA36RXQEiagJYfCfUGWlCQipKQaGBt3 + ThE7vOfmfYe54VPOdv6UeRL49/anH4L2ajwuLBktXLUf5j+VrbdpM/i81qJZxOT0UslXOkU9 + QVJ9UQqbphy7INVTU/TWZM4KYVWjjq6l174+vPf/iLi49D6bBY/qt7wxWPDw+jz1VV90GrNE + L0XJbDwUFFxicbioJLYsmuGDMPeenl0ibEosxRmJhlrMRcWJAOU9kQnCAgAA +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: Thu, 17 Apr 2014 20:35:17 -0000 + +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 ++# 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 +