Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jan 2017 16:19:05 +1030
From:      Shane Ambler <FreeBSD@ShaneWare.Biz>
To:        Baho Utot <baho-utot@columbus.rr.com>, freebsd-questions@freebsd.org
Subject:   Re: Building base, other than by default
Message-ID:  <9e99b996-360d-2a9f-a5fc-5e2da45c551a@ShaneWare.Biz>
In-Reply-To: <586D66D6.5070901@columbus.rr.com>
References:  <586D66D6.5070901@columbus.rr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 05/01/2017 07:49, Baho Utot wrote:
> I am working on a script to build base and I want to build it in another
> directory other than /usr/src.
> I would also like to place the result binaries in another directory
> other than /usr/obj.
> I also would like to build as a non-root user.
>
> Is this possible and can I install base from the build.

You can checkout the source code anywhere you want. The permissions on 
the directories should be the only factor preventing a user from compiling.

In your environment set MAKEOBJDIRPREFIX to the path you want the 
buildworld binaries while compiling, you can pass DESTDIR to 
installworld to install into a different directory.

env MAKEOBJDIRPREFIX=~/mybuild make buildworld
make installworld DESTDIR=~/myworld

You can also set __MAKE_CONF and SRCCONF to use different settings for 
each build.


-- 
FreeBSD - the place to B...Software Developing

Shane Ambler




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9e99b996-360d-2a9f-a5fc-5e2da45c551a>