[PATCH] doc: Fix parallel build of roff files
authorAustin Clements <amdragon@MIT.EDU>
Thu, 17 Apr 2014 20:34:57 +0000 (16:34 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:01:40 +0000 (10:01 -0800)
74/63cb35280c99ffdf7176fd593f3d033e7864f7 [new file with mode: 0644]

diff --git a/74/63cb35280c99ffdf7176fd593f3d033e7864f7 b/74/63cb35280c99ffdf7176fd593f3d033e7864f7
new file mode 100644 (file)
index 0000000..66f6068
--- /dev/null
@@ -0,0 +1,121 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id CD143431FAF\r
+       for <notmuch@notmuchmail.org>; Thu, 17 Apr 2014 13:35:17 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id Jqs8mglQ1P4p for <notmuch@notmuchmail.org>;\r
+       Thu, 17 Apr 2014 13:35:11 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu\r
+       [18.7.68.37])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id F0F44431FAE\r
+       for <notmuch@notmuchmail.org>; Thu, 17 Apr 2014 13:35:10 -0700 (PDT)\r
+X-AuditID: 12074425-f79906d000000cf9-7c-53503afd5ddb\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       (using TLS with cipher AES256-SHA (256/256 bits))\r
+       (Client did not present a certificate)\r
+       by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id DA.2C.03321.DFA30535; Thu, 17 Apr 2014 16:35:09 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id s3HKZ3u7025473; \r
+       Thu, 17 Apr 2014 16:35:04 -0400\r
+Received: from drake.dyndns.org (26-4-182.dynamic.csail.mit.edu [18.26.4.182])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s3HKZ14f006013\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Thu, 17 Apr 2014 16:35:03 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1Wat1R-0003n7-FQ; Thu, 17 Apr 2014 16:35:01 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] doc: Fix parallel build of roff files\r
+Date: Thu, 17 Apr 2014 16:34:57 -0400\r
+Message-Id: <1397766897-14475-1-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.9.1\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFlrPIsWRmVeSWpSXmKPExsUixG6novvXKiDY4OpnG4sbrd2MFtdvzmR2\r
+       YPJ4tuoWs8eWQ++ZA5iiuGxSUnMyy1KL9O0SuDKenFvCVPCOr+LS7TtsDYyLeboYOTkkBEwk\r
+       vt5qYoKwxSQu3FvP1sXIxSEkMJtJYuKxGYwQzkZGifOnetm7GDmAnCNMEht0IeJzGSVe717D\r
+       DtLNJqAhsW3/ckYQW0RAWmLn3dmsIDazgKXE1a/tTCC9wgJmEn+nioKEWQRUJTpXzgQr5xVw\r
+       kHh34T4bxBFyEiePTWadwMi7gJFhFaNsSm6Vbm5iZk5xarJucXJiXl5qka6FXm5miV5qSukm\r
+       RnBYuKjuYJxwSOkQowAHoxIPr8YP/2Ah1sSy4srcQ4ySHExKorzqlgHBQnxJ+SmVGYnFGfFF\r
+       pTmpxYcYJTiYlUR4TVWBcrwpiZVVqUX5MClpDhYlcd631lbBQgLpiSWp2ampBalFMFkZDg4l\r
+       Cd5nIEMFi1LTUyvSMnNKENJMHJwgw3mAhq8BqeEtLkjMLc5Mh8ifYtTlWPBjTQuTEEtefl6q\r
+       lDjvZgugIgGQoozSPLg5sHh+xSgO9JYw72GQUTzAVAA36RXQEiagJYfCfUGWlCQipKQaGBt3\r
+       ThE7vOfmfYe54VPOdv6UeRL49/anH4L2ajwuLBktXLUf5j+VrbdpM/i81qJZxOT0UslXOkU9\r
+       QVJ9UQqbphy7INVTU/TWZM4KYVWjjq6l174+vPf/iLi49D6bBY/qt7wxWPDw+jz1VV90GrNE\r
+       L0XJbDwUFFxicbioJLYsmuGDMPeenl0ibEosxRmJhlrMRcWJAOU9kQnCAgAA\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 17 Apr 2014 20:35:17 -0000\r
+\r
+The roff build rule builds all of the roff files in a single command.\r
+Previously, this was expressed as a multi-target rule, but since this\r
+is equivalent to specifying a copy of the rule for each target, make\r
+-jN could start up to N parallel instances of this command.  Fix this\r
+by bottlenecking this rule through a single stamp file.\r
+\r
+This also removes the unused man.stamp from CLEAN.\r
+---\r
+ doc/Makefile.local | 11 +++++++++--\r
+ 1 file changed, 9 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/doc/Makefile.local b/doc/Makefile.local\r
+index 0980c71..5cf140d 100644\r
+--- a/doc/Makefile.local\r
++++ b/doc/Makefile.local\r
+@@ -35,7 +35,13 @@ MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})\r
\r
+ # Use the man page converter that is available. We should never depend\r
+ # on MAN_ROFF_FILES if a converter is not available.\r
+-${MAN_ROFF_FILES}: ${MAN_RST_FILES}\r
++${MAN_ROFF_FILES}: $(DOCBUILDDIR)/.roff.stamp\r
++\r
++# By using $(DOCBUILDDIR)/roff.stamp instead of ${MAN_ROFF_FILES}, we\r
++# convey to make that a single invocation of this receipe builds all\r
++# of the roff files.  This prevents parallel make from starting an\r
++# instance of this recipe for each roff file.\r
++$(DOCBUILDDIR)/.roff.stamp: ${MAN_RST_FILES}\r
+ ifeq ($(HAVE_SPHINX),1)\r
+       $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(DOCBUILDDIR)/man\r
+       for section in 1 5 7; do \\r
+@@ -48,6 +54,7 @@ else\r
+       @echo "Fatal: build dependency fail."\r
+       @false\r
+ endif\r
++      touch ${MAN_ROFF_FILES} $@\r
\r
+ # Do not try to build or install man pages if a man page converter is\r
+ # not available.\r
+@@ -70,5 +77,5 @@ endif\r
+ $(dir)/docdeps.mk: $(dir)/conf.py $(dir)/mkdocdeps.py\r
+       $(mkdocdeps) $(srcdir)/doc $(DOCBUILDDIR) $@\r
\r
+-CLEAN := $(CLEAN) $(DOCBUILDDIR) $(dir)/docdeps.mk $(dir)/man.stamp\r
++CLEAN := $(CLEAN) $(DOCBUILDDIR) $(dir)/docdeps.mk $(DOCBUILDDIR)/.roff.stamp\r
+ CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES)\r
+-- \r
+1.9.1\r
+\r