Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jun 1996 02:50:48 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, jkh@time.cdrom.com
Cc:        freebsd-current@FreeBSD.org, nate@sri.MT.net
Subject:   Re: Building inside of /usr/src?
Message-ID:  <199606251650.CAA16299@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> Make's path building and priorities for finding the obj directory are now
>> broken.  Not only the source tree is broken.  Try this:

>But it's not!

>> 	$ cd /tmp
>> 	$ cvs co cat
>> 	$ cd cat
>> 	$ make		# builds in ".", OK
>> 	$ make clean
>> 	$ mkdir obj
>> 	$ make		# still builds in ".", not OK

>WRONG.  This is not how it works now!  I don't know what this weird

This is exactly how it works now.  Have you tried it? :-).

>fixation people have with trampling on /usr/src now is, but there's no
>reason for this to work because it's not looking in ${.SRCDIR}/obj and
>never will again.  Don't be fooled by the `objlink' stuff as that's
>only user convenience - the make system does *not* follow the link!

Building things in /usr/src is only slightly broken.  Building elsewhere
is completely broken.  My example builds in /tmp just because paths like
/home/bde wouldn't be portable.

>> 	$ make clean
>> 	$ mkdir /usr/obj/tmp /usr/obj/tmp/cat

>"make obj" is recommended.

It will normally fail because normal users won't have write permission
in /usr/obj, and in any case it only applies for building standard
sources.

>> 	$ rm -rf /usr/obj/tmp	# don't leave this trap
>> 	$ export MAKEOBJDIR=obj

>Again, this is wrong and I explained this!  MAKEOBJDIR is an absolute
>path now, NOT the name of the obj directory itself.

Actually, it's still relative to the current directory unless it begins
with a '/', but most of the point of this is lost by appending the full
path to the current directory to $MAKEOBJDIR.

>Sorry Bruce, but there's nothing broken here except your expectation
>that everything should be still broken in the ways it was broken
>before! :-)

There is no reason to break the old behaviour.  If you want to break
it, break it properly by removing the builtin /usr/obj path which is
at best right for building /usr/src.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606251650.CAA16299>