Subject: Question about controlling the parallelism of make
To: NetBSD Current Users <current-users@NetBSD.org>
From: Chris Ross <cross+netbsd@distal.com>
List: current-users
Date: 12/12/2007 10:01:50
   This isn't strictly a -current issue, but there are people on
this list who could help me, so apologies to those who don't
care.

   I have a software package that is a library directory, and a
set of application directories all of which need the library
to be built first.  With no help, the bsd.subdir.mk at the top
will cause them to be built in parallel, which will fail.  If
I do:

SUBDIR = lib a b c
.ORDER: all-lib all-a

   then it will build lib, before building a.  However, it builds
a alone, then b and c in parallel.

   Is there some magic, other than just:

all-a: all-lib
all-b: all-lib
all-c: all-lib

   that I can put into the makefile to cause what I'm looking
for?  The above seems to work, but feels somewhat inelegant.
And requires manual changes any time new applications are
added.

   Thanks!

                          - Chris