Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 May 2007 17:00:28 +0200
From:      Benjamin Lutz <mail@maxlor.com>
To:        ports@freebsd.org
Subject:   make -j patch
Message-ID:  <200705171700.32126.mail@maxlor.com>

next in thread | raw e-mail | index | archive | help
--nextPart3893590.F5m2mkboka
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hello,

I have another version of the patch that allows multiple make jobs for a=20
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=20
former intuitively hints at several port builds running at once,=20
instead of one single port build being built with several make=20
processes. I've shamelessly taken the MAKE_JOBS name from pav,=20
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=3Dkdebase 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.=20
    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+=3D "=3D=3D=3D> 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=20
modified version of it) to be added to FreeBSD. If the powers that be=20
agree to that, I will then also write patches for the porters handbook=20
and portlint.

Cheers
Benjamin

--nextPart3893590.F5m2mkboka
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQBGTG4MzZEjpyKHuQwRAmLMAJsG26OjdQBvd6lemGKIv8p/q/DwuQCfVnA8
hdEs5VLswVZibBxu5fPBBGY=
=aKVR
-----END PGP SIGNATURE-----

--nextPart3893590.F5m2mkboka--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200705171700.32126.mail>