Date: Mon, 31 Mar 1997 13:34:10 +1000 From: Bruce Evans <bde@zeta.org.au> To: current@freebsd.org, scrappy@hub.org Subject: Re: make -j3 on make world? Message-ID: <199703310334.NAA25635@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
> In reply to my own email, I did some playing around last night
>with the /usr/share/mk/* files, bsd.subdir.mk in particular, and came
>up with:
>
>_SUBDIRUSE: .USE
> @for entry in ${SUBDIR}; do \
> (if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
> ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE}"; \
> edir=$${entry}.${MACHINE}; \
> cd ${.CURDIR}/$${edir}; \
> else \
> ${ECHODIR} "===> ${DIRPRFX}$$entry"; \
> edir=$${entry}; \
> cd ${.CURDIR}/$${edir}; \
> fi; \
> ${MAKE} ${MAKEFLAGS} ${.TARGET:realinstall=install} DIRPRFX=${DIRPRFX}$$edir/); \
> done
>
>
> The only change is adding ${MAKEFLAGS} to the ${MAKE} line so
>that the -j3 flag carried down into the subdir's, so that make world
>works with parellel make...
>
> Is there any reason that I'm overlooking why this *shouldn't*
>be done this way? If not, and there are no arguments against it, I'd
>like to make the change a permanent feature...?
Yes, you're overlooking the bug in make that causes this behaviour. -j
only works when it is specified on the command line. When it is inherited
in ${MAKEFLAGS}, it is ignored because ${MAKEFLAGS} is parsed as a second
command line, and parsing of the real command line earlier sets the -B flag.
Don't change bsd.subdir.mk.
Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703310334.NAA25635>
