Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Sep 2017 10:03:26 +0000 (UTC)
From:      Wolfram Schneider <wosch@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r50880 - head/share/mk
Message-ID:  <201709191003.v8JA3QSW076795@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wosch
Date: Tue Sep 19 10:03:26 2017
New Revision: 50880
URL: https://svnweb.freebsd.org/changeset/doc/50880

Log:
  Implement workaround for a parallel doc build
  
  $ make p-all
  
  It works for the sub-directories in a given directory.
  
  On a standard quad core machine the build time goes down
  from ca. 20min to 5 minutes.
  
  PR: 222322

Modified:
  head/share/mk/doc.project.mk

Modified: head/share/mk/doc.project.mk
==============================================================================
--- head/share/mk/doc.project.mk	Tue Sep 19 09:57:15 2017	(r50879)
+++ head/share/mk/doc.project.mk	Tue Sep 19 10:03:26 2017	(r50880)
@@ -104,3 +104,9 @@ DOC_LOCAL_MK=	${DOC_PREFIX}/${LANGCODE}/share/mk/doc.l
 
 # Subdirectory glue.
 .include "doc.subdir.mk"
+
+# parallel build for target "all"
+NCPU?= 8
+p-all:
+	make -V SUBDIR | sed -E 's/[ ]+$$//' | tr " " "\n" | sed -E 's/^/make -C /' | tr '\n' '\0' | xargs -0 -n1 -P${NCPU} /bin/sh -c
+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709191003.v8JA3QSW076795>