Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Mar 2011 15:44:17 -0700
From:      Chuck Swiger <cswiger@mac.com>
To:        Eitan Adler <lists@eitanadler.com>
Cc:        John <lists@reiteration.net>, FreeBSD Ports ML <freebsd-ports@freebsd.org>
Subject:   Re: can make -j be used for ports?
Message-ID:  <A8D078D7-FA44-48CD-AA25-ACC702576BB2@mac.com>
In-Reply-To: <AANLkTi=xECg6s7HGeoJFQs96EGwS1tN0Ag6FgFO30QzM@mail.gmail.com>
References:  <4D7FBC0E.5020302@reiteration.net> <1468BFDD-5E3C-4756-830B-266D0942AED0@mac.com> <AANLkTi=xECg6s7HGeoJFQs96EGwS1tN0Ag6FgFO30QzM@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 15, 2011, at 3:35 PM, Eitan Adler wrote:
> [ ... ]
>> Yes.  Ports which support parallel builds will have MAKE_JOBS_SAFE=yes set in the port Makefile.  It defaults to running -j with MAKE_JOBS_NUMBER=`${SYSCTL} -n kern.smp.cpus`, but you can change that to some other # if you like.
> 
> No, this is incorrect. The MAKE_JOBS_NUMBER and MAKE_JOBS_SAFE is used
> internally when building a single port.

What is incorrect?

> When the OP is asking if he can manually specify -j on the command line which would end up
> building multiple ports in parallel. This can not be done (primarily
> because there is no locking done on ports)


It certainly wasn't clear to me that this is what the OP meant.  If you:

  cd /usr/ports/www/apache22
  make -j 3

...what do you expect to happen, and how many ports would you expect to be built at once?

(Building one port in parallel is supported, where the port itself is safe to do so; building many at the same time is not.  Supporting the former provides more speed gain for many situations as compared to the latter; which doesn't help at all if you are just installing or updating one port.)

Regards,
-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A8D078D7-FA44-48CD-AA25-ACC702576BB2>