From 5472c07a336c429dd5c1a0a86dfc464fbac895d0 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Tue, 19 Sep 2017 10:03:26 +0000 Subject: [PATCH] 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 --- share/mk/doc.project.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/mk/doc.project.mk b/share/mk/doc.project.mk index 244195bcbc..3d293f5a06 100644 --- a/share/mk/doc.project.mk +++ b/share/mk/doc.project.mk @@ -104,3 +104,9 @@ DOC_LOCAL_MK= ${DOC_PREFIX}/${LANGCODE}/share/mk/doc.local.mk # 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 +