Date: Wed, 11 Aug 2004 12:32:13 +0300 From: Ruslan Ermilov <ru@freebsd.org> To: Thomas Nystrom <thn@saeab.se> Cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: World broken in stage 1.1 Message-ID: <20040811093213.GA84908@ip.net.ua> In-Reply-To: <4119E315.1E03688D@saeab.se> References: <20040810231044.GA70020@xor.obsecurity.org> <20040811061202.GA80234@ip.net.ua> <20040811065912.GA95263@xor.obsecurity.org> <20040811080350.GK80234@ip.net.ua> <4119E315.1E03688D@saeab.se>
next in thread | previous in thread | raw e-mail | index | archive | help
--9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 11, 2004 at 11:12:53AM +0200, Thomas Nystrom wrote: > Ruslan Ermilov wrote: > >=20 > > Trying to set MAKEOBJDIRPREFIX in /etc/make.conf and attempting to buil= dworld > > RELENG_4 on a 4.x machine similarly fails right away. > >=20 > > The reason I'm writing this email is that I'm really interested in > > reproducing the case where it could have possible worked before. Any h= elp > > on your side would be highly appreciated. > >=20 > > The only case that I know of this could have worked (tested) is if make= (1) > > was instructed to prefer the MAKEOBJDIRPREFIX environment variable over= a > > global one, with ``make -E MAKEOBJDIRPREFIX''. Then setting MAKEOBJDIR= PREFIX > > in /etc/make.conf works. >=20 > I have been using 'MAKEOBJDIRPREFIX?=3D /home/obj' (or similair) in > /etc/make.conf for quite a long time now. NOTE: it must be '?=3D'. I have > used it on both 4.x and 5.x (latest 5.2.1-R). >=20 Yes, setting MAKEOBJDIRPREFIX?=3D in /etc/make.conf will work for "make buildworld", BUT FOR BUILDWORLD ONLY, because Makefile.inc1 will reset MAKEOBJDIRPREFIX in environment (as expected by make(1)) for all buildworld substages, correcting the user's mistake. In other words, it happens to magically work for a buildworld (and other world-related targets). OTOH, a plain "make" somewhere with MAKEOBJDIRPREFIX set both in environment (where make(1) expects to find it) and in /etc/make.conf will break. Compare: Good: # rm -rf /home/ru/obj # pwd /tmp/x # env MAKEOBJDIRPREFIX=3D/home/ru/obj make -f bsd.prog.mk whereobj /tmp/x # env MAKEOBJDIRPREFIX=3D/home/ru/obj make -f bsd.prog.mk obj /home/ru/obj/tmp/x created for /tmp/x # env MAKEOBJDIRPREFIX=3D/home/ru/obj make -f bsd.prog.mk whereobj /home/ru/obj/tmp/x Bad: # rm -rf /home/ru/obj # grep MAKEOBJDIRPREFIX /etc/make.conf=20 MAKEOBJDIRPREFIX?=3D /home/ru/obj # make -f bsd.prog.mk whereobj /tmp/x # make -f bsd.prog.mk obj /home/ru/obj/tmp/x created for /tmp/x # make -f bsd.prog.mk whereobj /tmp/x The "whereobj" target just prints the idea of the make(1)'s object directory (where object files get created, also the current working directory before make(1) starts to produce something). MAKEOBJDIRPREFIX in /etc/make.conf, in any form, is a strict "no no"! Fix it now, or you will get a ton of troubles some day. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBGeedqRfpzJluFF4RAhCDAKCLzVuU7GdATgQ7bcKBuHQQnCWhlwCeJqcu hsJbzFrqNBAhKHfXN/3Fz2Y= =XsK3 -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040811093213.GA84908>