Building base, other than by default
Shane Ambler
FreeBSD at ShaneWare.Biz
Thu Jan 5 05:49:09 UTC 2017
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
More information about the freebsd-questions
mailing list