From owner-freebsd-stable Tue Mar 19 7:46:55 2002 Delivered-To: freebsd-stable@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id B99F537B400 for ; Tue, 19 Mar 2002 07:46:40 -0800 (PST) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id g2JFkVR27172 for freebsd-stable@FreeBSD.ORG; Tue, 19 Mar 2002 17:46:31 +0200 (EET) (envelope-from ru) Date: Tue, 19 Mar 2002 17:46:31 +0200 From: Ruslan Ermilov To: freebsd-stable@FreeBSD.ORG Subject: Re: buildworld with ro /usr/src broken Message-ID: <20020319154631.GF87672@sunbay.com> References: <20020209130437.GA15287@myhakas.estpak.ee> <200202091743.g19HhIm00362@beerswilling.netscum.dyndns.dk> <20020227111914.GB30220@sunbay.com> <20020317050354.GA4524@moo.holy.cow> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020317050354.GA4524@moo.holy.cow> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Mar 17, 2002 at 12:03:55AM -0500, parv wrote: > in message <20020227111914.GB30220@sunbay.com>, > wrote Ruslan Ermilov thusly... > > > ... > > MAKEOBJDIR[PREFIX] only work right if set as environment variables. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > This is documented in make(1) manpage and in /usr/share/mk/bsd.obj.mk. > > > > I have an uncommitted patch that makes it possible to set them on > > make(1)'s command line but still no joy in attempting to set them > > in /etc/make.conf. I bear in mind adding a patch to Makefile.inc1 > > too that would prevent people from attempting to set MAKEOBJDIRPREFIX > > in /etc/make.conf. > > seems like it is not yet possible to use MAKEOBJDIRPREFIX again in > /etc/make.conf. last cvsup was done on Sun Mar 17 2002 00:07:35 UTC > (end time). (MAKEOBJDIRPREFIX could have been specified in > /etc/make.conf when i last built 4-stable around 2002-02-03 07.04.04 > UTC. > > > if MAKEOBJDIRPREFIX (=/source/obj) had been specified, > currently, in /etc/make.conf, make buildworld would die at the point > below. i had to unset MAKEOBJDIRPREFIX. (/usr/src is > symlinked to /source/src-stable, and /usr/obj to /source/obj.) > This is because MAKEOBJDIRPREFIX=/source/obj in /etc/make.conf overrides the later MAKEOBJDIRPREFIX=/usr/obj/source/src-stable/i386 assignment in Makefile.inc1 (in BMAKEENV). (make(1) prefers global variable to an environment variable if both are specified, unless otherwise told by the -e or -E options.) "make obj" then creates object directory using MAKEOBJDIRPREFIX from /etc/make.conf, but make(1) itself checks MAKEOBJDIRPREFIX environment variable (as documented in manpage), doesn't find this object directory ("make obj" created different directory), and ends up with ${.OBJDIR} set to /source/src-stable/games/fortune/strfile, which it cd's into. mkdep(1) then fails with EACCES if run as non-root user, or (if run under root) will spam your /usr/src with .depend (and object) files. The solution (of course) is to set MAKEOBJDIRPREFIX in environment. Cheers, -- Ruslan Ermilov Sysadmin and 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 freebsd-stable" in the body of the message