netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Cc: netdev@vger.kernel.org
Subject: [PATCH iputils 2/6] doc: fix parallel build of html/man pages
Date: Tue, 31 May 2016 23:48:21 -0400	[thread overview]
Message-ID: <1464752905-10347-2-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1464752905-10347-1-git-send-email-vapier@gentoo.org>

The use of the same tempdir prevents building of these files in parallel.
So build all of them in unique tempdirs so we can do them in parallel.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 doc/Makefile | 37 ++++++++++++++++++++++++-------------
 1 file changed, 24 insertions(+), 13 deletions(-)

diff --git a/doc/Makefile b/doc/Makefile
index 7ec4f1c..4f930a3 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -12,29 +12,40 @@ man: $(MANFILES)
 # lots of some strange temporary junk directories and files.
 # So, scope it to a temporary dir and clean all after each run.
 
-$(HTMLFILES): index.db
-	@-rm -rf tmp.db2html
-	@mkdir tmp.db2html
-	@set -e; cd tmp.db2html; docbook2html ../$< ; mv *.html ..
-	@-rm -rf tmp.db2html
+SETUP_TMPDIR = \
+	t="tmp.db2html.$@"; \
+	rm -rf $$t; \
+	mkdir $$t; \
+	cd $$t
+CLEAN_TMPDIR = \
+	cd ..; \
+	rm -rf $$t
+
+MAKE_HTML = \
+	@set -e; \
+	$(SETUP_TMPDIR); \
+	docbook2html ../$<; \
+	mv *.html ..; \
+	$(CLEAN_TMPDIR)
 
+$(HTMLFILES): index.db
+	$(MAKE_HTML)
 iputils.html: iputils.db
-	@-rm -rf tmp.db2html
-	@mkdir tmp.db2html
-	@set -e; cd tmp.db2html; docbook2html -u -o html ../$< ; mv html/$@ ..
-	@-rm -rf tmp.db2html
+	$(MAKE_HTML)
 
 # docbook2man produces utterly ugly output and I did not find
 # any way to customize this but hacking backend perl script a little.
 # Well, hence...
 
 $(MANFILES): index.db
-	@-mkdir tmp.db2man
-	@set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ;	mv $@ ..
-	@-rm -rf tmp.db2man
+	@set -e; \
+	$(SETUP_TMPDIR); \
+	nsgmls ../$< | sgmlspl ../docbook2man-spec.pl; \
+	mv $@ ..; \
+	$(CLEAN_TMPDIR)
 
 clean:
-	@rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html tmp.db2man
+	@rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html* tmp.db2man*
 
 snapshot:
 	@date "+%y%m%d" > snapshot.db
-- 
2.8.2

  reply	other threads:[~2016-06-01  3:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01  3:48 [PATCH iputils 1/6] start gitignore files Mike Frysinger
2016-06-01  3:48 ` Mike Frysinger [this message]
2016-06-02  2:39   ` [PATCH iputils 2/6] doc: fix parallel build of html/man pages YOSHIFUJI Hideaki
2016-06-01  3:48 ` [PATCH iputils 3/6] ping6: allow disabling of openssl support Mike Frysinger
2016-06-02  2:04   ` YOSHIFUJI Hideaki
2016-06-02  4:59   ` [PATCH iputils v2] ping6: allow disabling of openssl/libgcrypt support Mike Frysinger
2016-06-02  8:49     ` YOSHIFUJI Hideaki
2016-06-02 13:38       ` Mike Frysinger
2016-06-02 17:16     ` [PATCH iputils v3] " Mike Frysinger
2016-06-01  3:48 ` [PATCH iputils 4/6] fix handling of CFLAGS Mike Frysinger
2016-06-02  2:35   ` YOSHIFUJI Hideaki
2016-06-01  3:48 ` [PATCH iputils 5/6] tftpd: fix syslog setup Mike Frysinger
2016-06-02  2:10   ` YOSHIFUJI Hideaki
2016-06-02  4:33     ` Mike Frysinger
2016-06-02  8:31       ` YOSHIFUJI Hideaki
2016-06-01  3:48 ` [PATCH iputils 6/6] ping: fix -i number parsing in locales Mike Frysinger
2016-06-02  2:08   ` YOSHIFUJI Hideaki
2016-06-02  4:46   ` [PATCH iputils v2] ping: always accept . delimiter with -i number parsing Mike Frysinger
2016-06-02  8:28     ` YOSHIFUJI Hideaki
2016-06-02  2:06 ` [PATCH iputils 1/6] start gitignore files YOSHIFUJI Hideaki
2016-06-02  4:42   ` Mike Frysinger
2016-06-02  8:57     ` YOSHIFUJI Hideaki

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

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

  git send-email \
    --in-reply-to=1464752905-10347-2-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.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.
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 NNTP newsgroup(s).