Date: Sat, 1 Jun 2013 21:40:57 -0700 From: "Simon J. Gerraty" <sjg@juniper.net> To: Alexander Kabaev <kabaev@gmail.com> Cc: current@FreeBSD.ORG, sjg@juniper.net Subject: Re: Undesirable bmake behavior Message-ID: <20130602044057.9798358097@chaos.jnpr.net> In-Reply-To: <20130601234310.1ef241d5@kan.dyndns.org> References: <20130601234310.1ef241d5@kan.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
>today I got confronted with this little curiosity from bmake. I have >built and installed the world, and after reboot I ran 'make delete-old' >as root to get rid of accumulated stale files. This is what I got back: > >>>> Removing old files (only deletes safe to delete libs) >.... >>>> Old files removed >>>> Removing old directories >>>> Old directories removed >To remove old libraries run '/usr/obj/usr/src/make.amd64/make >delete-old-libs'. > >It turns out that somehow running make in src tree finds and tries to >run a copy from .OBJDIR, if one is present, unconditionally now. I do This simply what src/Makefile says to do, and AFAIK it has been that way for ages. Since delete-old is in TGTS it gets run via: # # Handle the user-driven targets, using the source relative mk files. # ${TGTS}: ${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET} and $ make -dV -V _MAKE PATH=${PATH} ${BINMAKE} -f Makefile.inc1 TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH} $ make -dV -V BINMAKE `if [ -x ${MAKEPATH}/make ]; then echo ${MAKEPATH}/make; else echo ${MAKE}; fi` -m ${.CURDIR}/share/mk $ make -V _MAKE PATH=/sbin:/bin:/usr/sbin:/usr/bin `if [ -x /var/obj/current/b/sjg/work/FreeBSD/current/src/make.amd64/make ]; then echo /var/obj/current/b/sjg/work/FreeBSD/current/src/make.amd64/make; else echo make; fi` -m /b/sjg/work/FreeBSD/current/src/share/mk -f Makefile.inc1 TARGET=amd64 TARGET_ARCH=amd64 $ Now you may be right that that's a bad idea, but it isn't anything new. --sjg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130602044057.9798358097>