cvs commit: src Makefile

Ruslan Ermilov ru at FreeBSD.org
Fri Jul 9 07:59:22 PDT 2004


On Fri, Jul 09, 2004 at 04:45:05PM +0200, Poul-Henning Kamp wrote:
> In message <20040709144332.GA2773 at ip.net.ua>, Ruslan Ermilov writes:
> >
> >--sdtB3X0nJg68CQEu
> >Content-Type: text/plain; charset=us-ascii
> >Content-Disposition: inline
> >Content-Transfer-Encoding: quoted-printable
> >
> >On Fri, Jul 09, 2004 at 01:55:50PM +0000, Poul-Henning Kamp wrote:
> >> phk         2004-07-09 13:55:50 UTC
> >>=20
> >>   FreeBSD src repository
> >>=20
> >>   Modified files:
> >>     .                    Makefile=20
> >>   Log:
> >>   Add a JFLAG which can be used to speed up universe:
> >>           make universe JFLAG=3D-j12
> >>  =20
> >>   Revision  Changes    Path
> >>   1.300     +3 -3      src/Makefile
> >>=20
> >What was wrong with ``make -j12 universe''?
> 
> It doesn't work.   You want the individual buildworlds
> to get a -j12, not the outside for-loop.
> 
I'm sure it works.  Outside for-loop cannot be affected by
-j12 because .for is unparallelizeable -- it just expands
the lines using the loop variable.  And -j12 is passed happily
to the individual buildworlds in .MAKEFLAGS.  Consider this
makefile:

: 1 2 3 4 5:
: 	@sleep `jot -r 1 0 1.0`
: 	@echo ${.TARGET} ${.MAKEFLAGS}
: 
: all: 1 2 3 4 5
: 
: all2:
: .for target in 1 2 3 4 5
: 	cd ${.CURDIR} && ${MAKE} ${target}
: .endfor

$ make -j4 all
2 -j 4
4 -j 4
5 -j 4
3 -j 4
1 -j 4

$ make -j4 all2
cd /usr/home/ru && make 1
1 -j 4
cd /usr/home/ru && make 2
2 -j 4
cd /usr/home/ru && make 3
3 -j 4
cd /usr/home/ru && make 4
4 -j 4
cd /usr/home/ru && make 5
5 -j 4


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- 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/cvs-src/attachments/20040709/8ab50269/attachment.bin


More information about the cvs-src mailing list