On Sun, Jan 25, 2009 at 4:44 PM, cpghost <cpgh...@cordula.ws> wrote:
> To build ports in parallel on a 4 core machine, I usually
> do this manually:
>  # cd /usr/ports/some/port
>  # make configure && make -j5 build && make install clean
> because all steps except "make build" are not compatible
> with -jN (some ports don't work with -jN in the "make build"
> phase either, but they are quite rare).
> Now, is there a way to teach portmaster to build or rebuild
> ports this way? The only workaround for now is something
> like:

What I do is the following via make.conf, which will work for
portmaster/portupgrade or manual builds:

# set MAKE_ARGS for the build target(s)
.if !(make(*install) || make(package))

Then as you find ports that don't build properly, add an entry like this:

# some ports don't like -j8, so we can undo the MAKE_ARGS addition for those
.if ${.CURDIR:M*/multimedia/mplayer}

It's a bit of a hack, but I've had decent success with this. Enough
ports fail to build with -jX, that I'd never do the above on a
production machine, especially since it's possible for some sort of
silent error that produces an unpredictable binary. But for my home
machine, I've been pretty happy with it.

freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to