buildworld and installworld

Ruslan Ermilov ru at freebsd.org
Fri Jan 23 11:32:54 PST 2004


On Fri, Jan 23, 2004 at 10:03:57PM +0300, Maxim Konovalov wrote:
> freebsd-questions@ material.
> 
> On Fri, 23 Jan 2004, 20:58+0200, Andrey Sharandakov wrote:
> 
> > Hi!
> >
> > 1. How can I change default dir. for buildworld output?
> > (/ust/obj to /some_dir/obj)
> 
> make MAKEOBJDIRPREFIX=/some_dir/obj
> 
WRONG!  While I've made the above work in -CURRENT, this still
doesn't work in RELENG_4 and shouldn't be relied upon.  From
<bsd.obj.mk>:

# MAKEOBJDIRPREFIX  Specifies somewhere other than /usr/obj to root the object
#               tree.  Note: MAKEOBJDIRPREFIX is an *environment* variable
#               and works properly only if set as an environment variable,
#               not as a global or command line variable!
#
#               E.g. use `env MAKEOBJDIRPREFIX=/somewhere/obj make'

Compare:

$ pwd
/tmp/foo/src
$ MAKEOBJDIRPREFIX=/tmp/foo/obj make -f bsd.obj.mk -V .OBJDIR
/tmp/foo/obj/tmp/foo/src
$ make MAKEOBJDIRPREFIX=/tmp/foo/obj -f bsd.obj.mk -V .OBJDIR
/tmp/foo/src

Passing MAKEOBJDIRPREFIX as a command line variable with ``buildworld''
only works because make(1) enters all command line variables in
environment before starting any subprocesses.


Cheers,
-- 
Ruslan Ermilov
FreeBSD committer
ru at FreeBSD.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20040123/6f81c80f/attachment.bin


More information about the freebsd-stable mailing list