From owner-freebsd-current@FreeBSD.ORG Sun Jun 2 05:11:24 2013 Return-Path: Delivered-To: current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6173C61B for ; Sun, 2 Jun 2013 05:11:24 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from tx2outboundpool.messaging.microsoft.com (tx2ehsobe005.messaging.microsoft.com [65.55.88.15]) by mx1.freebsd.org (Postfix) with ESMTP id 2608A1806 for ; Sun, 2 Jun 2013 05:11:23 +0000 (UTC) Received: from mail19-tx2-R.bigfish.com (10.9.14.234) by TX2EHSOBE008.bigfish.com (10.9.40.28) with Microsoft SMTP Server id 14.1.225.23; Sun, 2 Jun 2013 04:41:03 +0000 Received: from mail19-tx2 (localhost [127.0.0.1]) by mail19-tx2-R.bigfish.com (Postfix) with ESMTP id 22C5B40132; Sun, 2 Jun 2013 04:41:03 +0000 (UTC) X-Forefront-Antispam-Report: CIP:66.129.224.54; KIP:(null); UIP:(null); IPV:NLI; H:P-EMHUB02-HQ.jnpr.net; RD:none; EFVD:NLI X-SpamScore: 2 X-BigFish: S2(zz1432Izz1f42h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ah1fc6h1082kz8dhzz31h2a8h668h839hf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b88h1d0ch1d2eh1d3fh1dfeh1dffh1155h) Received-SPF: softfail (mail19-tx2: transitioning domain of juniper.net does not designate 66.129.224.54 as permitted sender) client-ip=66.129.224.54; envelope-from=sjg@juniper.net; helo=P-EMHUB02-HQ.jnpr.net ; -HQ.jnpr.net ; Received: from mail19-tx2 (localhost.localdomain [127.0.0.1]) by mail19-tx2 (MessageSwitch) id 1370148061319891_11373; Sun, 2 Jun 2013 04:41:01 +0000 (UTC) Received: from TX2EHSMHS028.bigfish.com (unknown [10.9.14.239]) by mail19-tx2.bigfish.com (Postfix) with ESMTP id 4A51FE0050; Sun, 2 Jun 2013 04:41:01 +0000 (UTC) Received: from P-EMHUB02-HQ.jnpr.net (66.129.224.54) by TX2EHSMHS028.bigfish.com (10.9.99.128) with Microsoft SMTP Server (TLS) id 14.1.225.23; Sun, 2 Jun 2013 04:41:01 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB02-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Sat, 1 Jun 2013 21:41:00 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id r524evL47661; Sat, 1 Jun 2013 21:40:59 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 9798358097; Sat, 1 Jun 2013 21:40:57 -0700 (PDT) To: Alexander Kabaev Subject: Re: Undesirable bmake behavior In-Reply-To: <20130601234310.1ef241d5@kan.dyndns.org> References: <20130601234310.1ef241d5@kan.dyndns.org> Comments: In-reply-to: Alexander Kabaev message dated "Sat, 01 Jun 2013 23:43:10 -0400." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Sat, 1 Jun 2013 21:40:57 -0700 Message-ID: <20130602044057.9798358097@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain X-OriginatorOrg: juniper.net X-Mailman-Approved-At: Sun, 02 Jun 2013 10:46:43 +0000 Cc: current@FreeBSD.ORG, sjg@juniper.net X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jun 2013 05:11:24 -0000 >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