svn commit: r50880 - head/share/mk
Wolfram Schneider
wosch at FreeBSD.org
Tue Sep 19 10:03:27 UTC 2017
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
+
More information about the svn-doc-all
mailing list