Subject: Re: recursive make -j 8
To: Andrew Wheadon <andrew@wipux2.wifo.uni-mannheim.de>
From: Chris G. Demetriou <cgd@cs.cmu.edu>
List: netbsd-help
Date: 03/11/1997 17:08:56
> What do I need to set/put in {/etc/mk.conf,bsd.own.mk}
> so that if I run a "make -j 8" from /usr/src the "-j 8"
> is not lost in any subdirectories that are entered ?

You need a smarter make, which keeps track of the number of
outstanding jobs.

The problem with simply passing the flag is that if you say 'make -j
8' at one level, and it tries to build 8 targets simultaneously each
of which try to 'make -j 8' something else (say, in a subdir), then
you can easily get exponential grown in the number of 'make'-spawned
processes running.


FWIW, i wrote some diffs that will reasonably parallelize 'make' from
e.g. /usr/src/usr.bin by start N jobs at once (depending on what level
of parallelism you set with -j).  Unfortunately, it doesn't really do
what it'd do in a 'perfect world' where make was smarter, but it comes
closer.


chris