Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Nov 2000 13:19:38 -0500
From:      Marcel Moolenaar <marcel@cup.hp.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Makoto MATSUSHITA <matusita@jp.FreeBSD.org>, current@FreeBSD.ORG, stable@FreeBSD.ORG
Subject:   Re: "make modules" kicks the first module directory twice
Message-ID:  <3A1030BA.D6CB42D0@cup.hp.com>
References:  <Pine.BSF.4.21.0011131953001.646-100000@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote:
> 
> > Index: Makefile.i386
> > ===================================================================
> > RCS file: /home/ncvs/src/sys/conf/Makefile.i386,v
> > retrieving revision 1.212
> > diff -u -r1.212 Makefile.i386
> > --- Makefile.i386       2000/10/29 09:47:50     1.212
> > +++ Makefile.i386       2000/11/13 07:49:00
> > @@ -271,11 +271,13 @@
> >
> >  modules:
> >         @mkdir -p ${.OBJDIR}/modules
> > -       cd $S/modules && env ${MKMODULESENV} ${MAKE} obj all
> > +       cd $S/modules && env ${MKMODULESENV} ${MAKE} obj && \
> > +               env ${MKMODULESENV} ${MAKE} all
> >
> >  modules-depend:
> >         @mkdir -p ${.OBJDIR}/modules
> > -       cd $S/modules && env ${MKMODULESENV} ${MAKE} obj depend
> > +       cd $S/modules && env ${MKMODULESENV} ${MAKE} obj $$ \
> > +               env ${MKMODULESENV} ${MAKE} depend
> >
> >  modules-clean:
> >         cd $S/modules && env ${MKMODULESENV} ${MAKE} clean
> >
> 
> `&&' should never be used in shell commands in makefiles, although it
> may be only a bad example.

Mostly that, yes. The first try for a "fix" was:

	cd $S/modules && env ${MKMODULESENV} ${MAKE} obj
	cd $S/modules && env ${MKMODULESENV} ${MAKE} all

But since $S expands to "../.." and -j runs a single shell, the first cd
will succeed, but not the second.

I simply copied the "construction" in the second and posted fix.

I'll commit a fix with just semi-colons today for all architectures if
someone hasn't done that already by that time.

-- 
Marcel Moolenaar
  mail: marcel@cup.hp.com / marcel@FreeBSD.org
  tel:  (408) 447-4222


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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