Date: Tue, 29 Oct 2013 14:07:27 -0700 From: Matthew Fleming <mdf@FreeBSD.org> To: Xin LI <delphij@freebsd.org> Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org> Subject: Re: svn commit: r257350 - head Message-ID: <CAMBSHm_r%2B=9fej0wuqLrTuKd9Wp25Ftrdi4wjv_V13n=udQr5Q@mail.gmail.com> In-Reply-To: <201310291746.r9THkR6D065382@svn.freebsd.org> References: <201310291746.r9THkR6D065382@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 29, 2013 at 10:46 AM, Xin LI <delphij@freebsd.org> wrote: > Author: delphij > Date: Tue Oct 29 17:46:26 2013 > New Revision: 257350 > URL: http://svnweb.freebsd.org/changeset/base/257350 > > Log: > In r257079, SRCDIR is pointed to ${.CURDIR} when not set. However, > Makefile.inc1 is being called in sub-make's where make(1) would, > by default, implicitly chdir(2) to ${.OBJDIR} before executing any > targets. This would make some targets, like delete-old, when trying > to derive various variables introduced by change r256921 using > ``make -f Makefile.inc1'' that also rely on SRCDIR to fail. > > This changeset adds an explicit cd ${.CURDIR} before these unwrapped > make calls, making them in line with the other ones that are already > being wrapped with the explicit chdir's. > > Tested by: gjb > MFC after: 5 days > > Modified: > head/Makefile.inc1 > > Modified: head/Makefile.inc1 > > ============================================================================== > --- head/Makefile.inc1 Tue Oct 29 17:38:13 2013 (r257349) > +++ head/Makefile.inc1 Tue Oct 29 17:46:26 2013 (r257350) > @@ -1686,6 +1686,7 @@ delete-old-files: > # argument list will get too long. Using .for/.endfor make "loops" will > make > # the Makefile parser segfault. > @exec 3<&0; \ > + cd ${.CURDIR}; \ > ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ > -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \ > Here and below, wouldn't passing -C {.CURDIR} to make be safer? I admit I don't know make that well, so I may be wrong here. Thanks, matthew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMBSHm_r%2B=9fej0wuqLrTuKd9Wp25Ftrdi4wjv_V13n=udQr5Q>