5.3 and DESTDIR

Paul Richards paul at originative.co.uk
Wed Jan 5 09:24:36 GMT 2005

On Tue, Jan 04, 2005 at 09:48:21PM +0000, Gary wrote:
> Hi
> There seems to be something broken using DESTDIR when using buildworld.
> The command 'make buildworld DESTDIR=/opt/somewhere KERNCONF=MYKERNEL' 
> fails with something looking like this..
>  cc -O -pipe  -I/usr/obj/usr/src/i386/legacy/usr/include -c
>  /usr/src/games/fortune/strfile/strfile.c
>  make: don't know how to make /data/jail/ Stop
> *** Error code 2

I don't know what's causing this, it's going to be something local
to your env. Building with DESTDIR works fine.

> Making the command 'make buildworld KERNCONF=MYKERNEL'  works fine.

buildworld doesn't build the kernel, so specifying KERNCONF is
redundant in this case. There's a buildkernel target if you want to
build the kernel. You can also put KERNCONF in /etc/make.conf to
save you specifying it each time.

> However, from the /usr/src/Makefile it notes the following
> '@echo "Define DESTDIR to where you want to install FreeBSD,"'
> So I did.
> trinity# echo $DESTDIR
> /opt/jails/jails.buildworld
> However this did not put anything in where I requested it should go.

DESTDIR is not used during buildworld, only installworld, it
determines where the newly built OS gets installed to. Therefore,
you wouldn't see anything in the area you've specified until you
run installworld.

It's MAKEOBJDIRPREFIX that determines where the build files go and
by default that's /usr/obj/

Paul Richards

More information about the Ukfreebsd mailing list