Subject: Re: Have pkgsrc building make use of SMP?
To: Hubert Feyrer <>
From: Lars Nordlund <>
List: tech-pkg
Date: 04/06/2005 00:47:41
Tue 2005-04-05 klockan 22:57 +0200 skrev Lars Nordlund:
> It would be really cool to be able to just have pkgsrc build multiple
> packages at the same time.
> Example:
> 'foo' depends upon 'bar' and 'rab'. Neither of 'bar' or 'rab' depend on
> the other.
> # cd /usr/pkgsrc/meta-pkgs/foo; make -j 2
> <pkgsrc spawns two build processes, one for bar and one for rab. when
> both are done the build of foo continues..>

After some thought and a quick trial and error I found that a temporary
generated Makefile like this would solve my problem:
foo: bar rab

        (cd /usr/pkgsrc/editors/emacs; $(MAKE) install)

        (cd /usr/pkgsrc/net/lftp; $(MAKE) install)

'make -j 2 foo' will now build emacs and lftp at the same time. I had
some problems with ALLOW_VULNERABLE_PACKAGES but that should be possible
to solve.

Now all that is needed is a tool which will generate these kind of
temporary makefiles based on the wanted package's dependancy list. I am
checking out pkgtools/pkgdep right now (actually I am stuck waiting for
make index.. :-)

Ah, how nice. Another pet project. I have to start with this after I buy
a dual core cpu some day.. :-)

Best regards,
	Lars Nordlund