Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: amd64 netbsd-5 build.sh distribution fail



Hi,

I got a hint that my problem was probably building without -M or -O
on the command line.

My /etc/mk.conf says:
MKOBJDIRS=yes
MAKEOBJDIRPREFIX=/home/netbsd/5/${MACHINE}/obj
KERNOBJDIR=/home/netbsd/5/${MACHINE}/kern-compile
TOOLDIR=/home/netbsd/5/${MACHINE}/tools
DESTDIR=/home/netbsd/5/${MACHINE}/destdir
RELEASEDIR=/home/netbsd/5/${MACHINE}/release

I shouldn't need no extra stuff on the command line, right?

Let's test:

./build.sh params > /tmp/params-without
./build.sh -M /home/netbsd/5/amd64/obj params > /tmp/params-with

diff -u /tmp/params-with /tmp/params-without yields as relevant output:
-           MAKEFLAGS = ' -d e -m /trees/src-5/share/mk 
HOST_OSTYPE=NetBSD-5.0_BETA-x86_64 MKOBJDIRS=yes USETOOLS=yes 
_SRC_TOP_=/trees/src-5 _SRC_TOP_OBJ_=/home/netbsd/5/amd64/obj/trees/src-5 
_THISDIR_=etc/'
+           MAKEFLAGS = ' -d e -m /trees/src-5/share/mk 
HOST_OSTYPE=NetBSD-5.0_BETA-x86_64 MKOBJDIRS=yes USETOOLS=yes 
_SRC_TOP_=/trees/src-5 _SRC_TOP_OBJ_=/trees/src-5 _THISDIR_=etc/'

Aaaaargh!

From build.sh (in validateparams):
                # Try to create the top level object directory before
                # running "make obj", otherwise <bsd.own.mk> will not
                # set the correct value for _SRC_TOP_OBJ_. 
                #
                # If either -M or -O was specified, then we have the
                # directory name already.
                #
                # If neither -M nor -O was specified, then try to get
                # the directory name from bsd.obj.mk's __usrobjdir
                # variable, which is set using complex rules.  This
                # works only if TOP = /usr/src.
                #

Let's see if that is actually correct. (Rummage through share/mk)

Add BSDSRCDIR=/trees/src-5 and BSDOBJDIR=/home/netbsd/5/${MACHINE}/obj
to /etc/mk.conf and lo and behold, MAKEFLAGS looks good.

<whine>why can't BSDSRCDIR be set to pwd and BSDOBJDIR to MAKEOBJDIRPREFIX
if not explicitly set?</whine>

Also checking for /usr/src as TOP instead of BSDSRCDIR is probably wrong.

regards,
        spz
-- 
spz%serpens.de@localhost (S.P.Zeidler)


Home | Main Index | Thread Index | Old Index