Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Jan 2004 11:07:52 -0500
From:      "Brian F. Feldman" <green@FreeBSD.org>
To:        Ruslan Ermilov <ru@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/share/mk bsd.obj.mk 
Message-ID:  <200401081607.i08G7q5U011051@green.bikeshed.org>
In-Reply-To: Message from Ruslan Ermilov <ru@FreeBSD.org>  <20040108080514.GB27761@FreeBSD.org.ua> 

next in thread | previous in thread | raw e-mail | index | archive | help
Ruslan Ermilov <ru@FreeBSD.org> wrote:
> On Wed, Jan 07, 2004 at 03:41:03PM -0500, Brian F. Feldman wrote:
> > Ruslan Ermilov <ru@FreeBSD.org> wrote:
> > > On Thu, Jan 01, 2004 at 09:05:48PM -0800, Brian Feldman wrote:
> > > > green       2004/01/01 21:05:48 PST
> > > > 
> > > >   FreeBSD src repository
> > > > 
> > > >   Modified files:
> > > >     share/mk             bsd.obj.mk 
> > > >   Log:
> > > >   Fix a very corner case when you want to make cleandir SUBDIRs which
> > > >   are built using a ${MAKE} that's not just "make".
> > > >   
> > > >   Test by:        make universe (followed by cleandirs)
> > > >   
> > > >   Revision  Changes    Path
> > > >   1.49      +2 -2      src/share/mk/bsd.obj.mk
> > > > 
> > > The old version used ${MAKE}, why this was a problem at all?
> > 
> > The ${MAKE} that it uses would be overridden by the default ${MAKE} value 
> > each time; this doesn't occur when dependencies are executed, though.
> > 
> Please explain in more detail.  With the below makefile,
> 
> : all:
> : 	@cd ${.CURDIR}; ${MAKE} print-make
> : 
> : print-make:
> : 	@echo ${MAKE}
> 
> running /usr/bin/make will rightfully print "/usr/bin/make".
> make(1)'s main() always sets MAKE to argv[0] as its first task.

Here is the difference in behavior:

{"/home/green/tmp/x"}$ make print-make all
make
make
{"/home/green/tmp/x"}$ make MAKE='/usr/bin/make -DNONDEF' print-make all
/usr/bin/make -DNONDEF
/usr/bin/make


-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green@FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\




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