Date: Wed, 27 May 2009 07:35:15 GMT From: David Naylor <naylor.b.david@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/134977: [port/Mk] Expose MAKE_JOBS_NUMBER for MAKE_JOBS Message-ID: <200905270735.n4R7ZFc2084721@www.freebsd.org> Resent-Message-ID: <200905270740.n4R7e14U061904@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 134977 >Category: ports >Synopsis: [port/Mk] Expose MAKE_JOBS_NUMBER for MAKE_JOBS >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed May 27 07:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: David Naylor >Release: FreeBSD 7.1 >Organization: Private >Environment: FreeBSD dragon.dg 7.1-RELEASE-p2 FreeBSD 7.1-RELEASE-p2 #0: Sun Feb 1 20:27:42 SAST 2009 root@dragon.dg:/tmp/tmp/src/sys/GENERIC i386 >Description: Currently if a port needs to pass custom flags to implement concurrency it has to do ${_MAKE_JOBS:C/-j//}. This results in a port needing knowledge and use of bsd.*.mk internals. >How-To-Repeat: n/a >Fix: The patch changes MAKE_JOBS_NUMBER from a user definable to a user tweakable (thus it is always available when MAKE_JOBS_SAFE is defined) and exposes a way for ports to get the number of concurrent builds requested. It *should* have no functional change for existing ports (`find /usr/ports -name Makefile | xargs grep MAKE_JOBS_NUMBER` reveals nothing and _MAKE_JOBS expands to the same value). Patch attached with submission follows: --- /usr/ports/Mk/bsd.port.mk 2009-05-23 13:20:58.000000000 +0200 +++ ports/Mk/bsd.port.mk 2009-05-27 08:38:44.000000000 +0200 @@ -2185,11 +2185,8 @@ _MAKE_JOBS= # .else .if defined(MAKE_JOBS_SAFE) || defined(FORCE_MAKE_JOBS) -.if defined(MAKE_JOBS_NUMBER) +MAKE_JOBS_NUMBER?= `${SYSCTL} -n kern.smp.cpus` _MAKE_JOBS= -j${MAKE_JOBS_NUMBER} -.else -_MAKE_JOBS= -j`${SYSCTL} -n kern.smp.cpus` -.endif .if defined(FORCE_MAKE_JOBS) BUILD_FAIL_MESSAGE+= "You have chosen to use multiple make jobs (parallelization) for all ports. This port was not tested for this setting. Please remove FORCE_MAKE_JOBS and retry the build before reporting the failure to the maintainer." .endif >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905270735.n4R7ZFc2084721>