Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 2015 07:00:25 -0700
From:      Navdeep Parhar <nparhar@gmail.com>
To:        Don Lewis <truckman@FreeBSD.org>
Cc:        darius@dons.net.au, sjg@juniper.net, tim@kientzle.com, rmacklem@uoguelph.ca, freebsd-current@FreeBSD.org
Subject:   Re: -current broken when MAKEOBJDIRPREFIX is set (was: src is on NFS)
Message-ID:  <20150720140025.GA9610@ox>
In-Reply-To: <201507200605.t6K65msT089869@gw.catspoiler.org>
References:  <FB13089A-4562-4FCB-ADCD-039A1A2E90E0@dons.net.au> <201507200605.t6K65msT089869@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 19, 2015 at 11:05:48PM -0700, Don Lewis wrote:
> On 19 Jul, O'Connor, Daniel wrote:
> > 
> >> On 19 Jul 2015, at 02:56, Simon J. Gerraty <sjg@juniper.net> wrote:
> >> 
> >> O'Connor, Daniel <darius@dons.net.au> wrote:
> >>> However, Crochet _does_ build on the NFS client _and_ when the
> >>> source tree isn't in /usr/src which makes this issue very strange
> >>> :-/
> >> 
> >> I've seen similar errors in rescue... (no NFS) though I cannot 
> >> quite recall the cause other than it seems very sensitive
> >> to MAKEOBJDIRPREFIX value.
> > 
> > Yeah the subject is wrong (I just updated it).
> > 
> > I just did a build like so and it worked..
> > env MAKEOBJDIRPREFIX=/src/obj-amd64 make -j 8 buildworld
> > 
> > But this did not..
> > make -j 8 buildworld MAKEOBJDIRPREFIX=/src/obj-amd64
> > 
> > So, it seems MAKEOBJDIRPREFIX only works as an environmental variable
> > - I wonder if there is a way the make system can be changed to warn
> > about that?
> 
> At least it is documented in /usr/share/mk/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'
> 
> Not the most obvious place to look ...

It is documented in build(7) too:

MAKEOBJDIRPREFIX  Defines the prefix for directory names in the tree of
built objects.  Defaults to /usr/obj if not defined.  This variable
should only be set in the environment and not via /etc/make.conf or the
command line.


Regards,
Navdeep



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