Date: Mon, 28 May 2001 16:12:51 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Bruce Evans <bde@zeta.org.au> Cc: Peter Pentchev <roam@orbitel.bg>, Sheldon Hearn <sheldonh@uunet.co.za>, netch@lucky.net, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: -DNOCLEAN - was: Re: cvs commit: src/contrib/amd/include am_defs.h src/usr.sbin/amd/includeconfig.h src/etc/mtree BSD.include.dist src/include Makefilesrc/sbin/mount_msdos mount_msdos.c src/sbin/mountd mountd.csrc/share/man/man7 hier.7 src/sys/boot/forth loader.conf ... Message-ID: <20010528161251.A98656@sunbay.com> In-Reply-To: <Pine.BSF.4.21.0105282147000.1612-100000@besplex.bde.org>; from bde@zeta.org.au on Mon, May 28, 2001 at 10:05:11PM %2B1000 References: <20010528134222.B588@ringworld.oblivion.bg> <Pine.BSF.4.21.0105282147000.1612-100000@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, May 28, 2001 at 10:05:11PM +1000, Bruce Evans wrote: > On Mon, 28 May 2001, Peter Pentchev wrote: > > > On Mon, May 28, 2001 at 12:17:23PM +0200, Sheldon Hearn wrote: > > > > > > > > > On Mon, 28 May 2001 13:04:02 +0300, Valentin Nechayev wrote: > > > > > > > Is -DNOCLEAN guaranteed to work when /usr/obj/`/bin/pwd` was already > > > > cleaned manually (rm -rf)? > > > > > > No, because you may have .depend files in your src tree. Have a look: > > > > > > find /usr/src -name '.depend' > > Or other garbage. Mainly, subdirectories named "obj" that have .depend > or other garbage in them, or just exist. > > > Hmm.. I thought the src tree was not touched at all during the build > > process? > > Depends how much garbage is in it. If buildworld is started with an > empty /usr/obj, then the initial clean step in it cleans the src tree. > This will normally touch the src tree iff the src tree contains garbage. > However, it won't touch the src tree if all the garbage is in subdirs > named "obj". This was broken ages ago in rev.1.5 of bsd.obj.mk. Previous > versions used rm -fr to kill "obj" in all cases (it was a link by > default, but the NOOBJLINK made it a subdir, and rm -fr was required to > handle that case). > > > The only files I could find with a find /usr/src -type f -name .depend > > were files that I myself had generated, by manually cd'ing into > > a directory and running make clean depend all there. The usual process > > of 'make world' or 'make buildworld' does not generate them there, > > it places them all within the /usr/obj tree. > > This is normal building, so makeworld should support it. > > > On second thoughts, make(1) appears to use a .depend file in the current > > directory, even if MAKEOBJDIRPREFIX is set to /usr/obj. So it might indeed > > be a good idea to do a 'find /usr/src -name .depend -delete', just in case. > > I think this only happens when ${.OBJDIR} doesn't contain .depend. > make(1) has an undocumented search path for '.include "foo"'. > Unfortunately not. If both ${.OBJDIR}/.depend and ${.CURDIR}/.depend exist, ${.CURDIR}/.depend is preffered over: : $ MAKEOBJDIR=/tmp/obj make whereobj : /tmp/obj : $ cat .depend : foo: : @echo ${.TARGET} : $ cat /tmp/obj/.depend : bar: : @echo ${.TARGET} : $ MAKEOBJDIR=/tmp/obj make foo : foo : $ MAKEOBJDIR=/tmp/obj make bar : make: don't know how to make bar. Stop : $ rm .depend : $ MAKEOBJDIR=/tmp/obj make bar : bar Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010528161251.A98656>