make -j patch
Benjamin Lutz
mail at maxlor.com
Thu May 17 15:00:43 UTC 2007
Hello,
I have another version of the patch that allows multiple make jobs for a
port build, please tell me what you think:
http://www.maxlor.com/freebsd/files/make_jobs.diff
I've abandoned the name PARALLEL_BUILD in favor of MAKE_JOBS since the
former intuitively hints at several port builds running at once,
instead of one single port build being built with several make
processes. I've shamelessly taken the MAKE_JOBS name from pav,
thanks :)
Here's an explanation of the variables used:
ENABLE_MAKE_JOBS: The master switch that enables or disables the whole
thing. The user is supposed to set it in his /etc/make.conf . If
this variable isn't set, the ports are supposed to build like they
always did.
ALLOW_MAKE_JOBS: Goes into a port's makefile. The port maintainer
indicates with it that the port can be built with multiple make
jobs.
MAKE_JOBS_WHITELIST: Allows the user to override ALLOW_MAKE_JOBS. Any
port whose UNIQUENAME is listed in MAKE_JOBS_WHITELIST will have
its ALLOW_MAKE_JOBS defined. The user would put something like this
in his /etc/make.conf: MAKE_JOBS_WHITELIST=kdebase gtk20
The following are new "internal" variables I introduced:
CPUS: The number of CPUs in the system.
MAKE_JOBS_NJOBS: The number of make jobs that will be used. Currently,
this is ${CPUS} + 1.
MAKE_JOBS_ARGS: The argument that is passed to make.
BUILD_FAILMSG: A message that is printed if the do-build stage fails.
Note that this variable can be used by any part of the ports system,
not just the MAKE_JOBS part. To use it, write code like
BUILD_FAILMSG+= "===> Foo"
Each message added to BUILD_FAILMSG like this will be printed at the
end of the do-build stage (if it fails), one paragraph per message.
The MAKE_JOBS code currently uses this to inform the user that he
needn't bother to send bug reports if MAKE_JOBS_WHITELIST is used.
Now, please let's hear what you think! I would like for this patch (or a
modified version of it) to be added to FreeBSD. If the powers that be
agree to that, I will then also write patches for the porters handbook
and portlint.
Cheers
Benjamin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20070517/ea8501ce/attachment.pgp
More information about the freebsd-ports
mailing list