Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Sep 2017 14:23:57 +0000
From:      Glen Barber <gjb@FreeBSD.org>
To:        Wolfram Schneider <wosch@FreeBSD.org>
Cc:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   Re: svn commit: r50880 - head/share/mk
Message-ID:  <20170919142357.GD20908@FreeBSD.org>
In-Reply-To: <201709191003.v8JA3QSW076795@repo.freebsd.org>
References:  <201709191003.v8JA3QSW076795@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--mSxgbZZZvrAyzONB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Sep 19, 2017 at 10:03:26AM +0000, Wolfram Schneider wrote:
> Author: wosch
> Date: Tue Sep 19 10:03:26 2017
> New Revision: 50880
> URL: https://svnweb.freebsd.org/changeset/doc/50880
>=20
> Log:
>   Implement workaround for a parallel doc build
>  =20
>   $ make p-all
>  =20
>   It works for the sub-directories in a given directory.
>  =20
>   On a standard quad core machine the build time goes down
>   from ca. 20min to 5 minutes.
>  =20
>   PR: 222322
>=20
> Modified:
>   head/share/mk/doc.project.mk
>=20
> Modified: head/share/mk/doc.project.mk
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- 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=3D	${DOC_PREFIX}/${LANGCODE}/share/mk/do=
c.l
> =20
>  # Subdirectory glue.
>  .include "doc.subdir.mk"
> +
> +# parallel build for target "all"
> +NCPU?=3D 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
> +
>=20

Would it be more preferable to use the number of CPUs available on the
system, instead of hard-coding a value?  Such as:

NCPU?=3D $$(sysctl -n hw.ncpu)

This would allow those with fewer than 8 CPUs to not need to specify
CPU=3Dn when invoking make(1).

On an additional point, is there any reason in particular you did not
make parallel builds the default?

Glen


--mSxgbZZZvrAyzONB
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAlnBKH0ACgkQAxRYpUeP
4pOh+w/7BcZ2JTYUlH2naL44Nm4C7UkakWJ2RS/mSKYcOQ23V3KvZSeIfA9Tu3E5
hIW5I6OXO38mvA6qgLhFZVc6uYhO4mkAFF3LCm8JKiSYfMVeQKbSWY4NROatqVpY
FZcSecnSUxwLYpQu+rCfavRm3BegOVaqdo3zsrawNf/EM6xAZvX6qh+Wxd4I0NII
4nCUyHM7s/xB5yEhpzjnD3R9yHuynNwLCaZeOJOe3FykX65yWcvLzrPZHaER8W/a
Q3Bw3k/fkY6udvZgDrCL/cLCWFE7tj3H0a7iZM4IXtDwOm/irSqBFgisO6arUMAm
K7fkY+bmxaJGSRcJipv5UuCxqBpDM0jEPi1irtLRBf/Xd1BEDpQrVvQBSOo2LIHv
omJ5a67fKQiE9SKkXi6Ger6WdULYKIndG0Ww++U0JyEs/2z2kEpZBK9d00ijEzOK
2yOqkD3nudLIeoAmucMbb5spvg1WGVl11/7M156aI1fzWNs9XQY7iKMAAjUisWDA
DHn3pSli8fN4Ls/A0xHhdr2k9G245w1LGndwkyim0jRSvSlO369Bj/JGGQ/BArDo
NGDT9CABuP8/7f+bzKki50ACiVbeZoalmJCu8eWFVH9fRO9IzO4yElDDjIo4Oi4h
RGPxCRwn/hvMmeFEVgkc8Pqa75aED/+ga3MQ2htupjCvHT9GIjw=
=qDzJ
-----END PGP SIGNATURE-----

--mSxgbZZZvrAyzONB--



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