Fully parallelized "make universe"

From: Ruslan Ermilov <ru_at_FreeBSD.org>
Date: Tue, 17 Aug 2004 11:10:30 +0300
Poul-Henning Kamp wrote:
> David O'Brien writes:
> >Actually I'd really love for a way to do the outter loop in parallel.
> >Due to -j messing up error output too much, I'd like to have the work for
> >each platform going in parallel instead.  E.g.:
> >
> >    make universe for i386 only &
> >    make universe for powerpc only &
> >    make universe for sparc64 only &
> >    make universe for amd64 only &
> >    make universe for alpha only &
> >    make universe for ia64 only &
> 
> True, but I can't get that working no matter how much I've tried.
> 
OK, here it comes.  The attached patch unrolls the main universe
loop, making it possible for "universe" subtargets corresponding
to individual architectures to be built in parallel.

EXAMPLES

make -j4 universe
	will build four architectures in parallel, each will be
	built using four parallel make's.

make -j8 universe JFLAG=-j4
	will build eight architectures in parallel, each will be
	built using four parallel make's.

make -j8 universe JFLAG=-B
	will build eight architectures in parallel, each will be
	built using one make.

Please test.

Points considered: since "buildkernels" is implemented using the
make's .for loop, kernels for a given architecture are built
sequentially (each can still be built in parallel).  I didn't see
much point in parallelizing this task, but this is easily doable.
(One redundant JFLAG when calling buildkernels was removed by
the patch.)


Cheers,
-- 
Ruslan Ermilov
ru_at_FreeBSD.org
FreeBSD committer

Received on Tue Aug 17 2004 - 06:10:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:06 UTC