From owner-freebsd-current Sun Mar 30 19:35:48 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA10489 for current-outgoing; Sun, 30 Mar 1997 19:35:48 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA10483 for ; Sun, 30 Mar 1997 19:35:45 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id NAA25635; Mon, 31 Mar 1997 13:34:10 +1000 Date: Mon, 31 Mar 1997 13:34:10 +1000 From: Bruce Evans Message-Id: <199703310334.NAA25635@godzilla.zeta.org.au> To: current@freebsd.org, scrappy@hub.org Subject: Re: make -j3 on make world? Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > 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