tech-toolchain archive

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

Re: build.sh release failure with relative path



On Mon, 22 Mar 2010, Christoph Egger wrote:
> When $KERNOBJDIR is a relative path then build.sh release fails
> with 
> 
>       nbconfig: cannot create $KERNOBJDIR/GENERIC

Please could you explain your use case.  Where are you setting
KERNOBJDIR?  What are you trying to do that requires a custom KERNOBJDIR
but that cannot easily specify it as an absolute path?  And, if you
really want it to be relative, then what should it be relative to
(KERNSRCDIR, NETBSDSRCDIR, or something else?).

> 1. Fix nbconfig to prepend prefix to builddir specified via -b

How would nbconfig know what prefix to prepend?

> 2. Fix call to nbconfig by prepending prefix to the kernel config
>    file (removes change directory to kernel config dir)

How would etc/Makefile know what prefix to prepend?

> [3. make build.sh change KERNOBJDIR to an absolute path, relative
>     to build.sh's ${TOP}]

Hmm, are you invoking build.sh with "-V KERNOBJDIR=..."?  If that's
the case, then I think it would be fine for build.sh to have a list of
variables that, if set via "-V", will be made absolute (relative to
build.sh's ${TOP}) before being passed down to the rest of the build.
We already have several variables that will be converted from relative
to absolute if they are set via build.sh command line options (e.g. -R,
-T, -O, ...), but not if they are set in some other way.

If you are setting KERNOBJDIR in mk.conf or the environment, then I
think that there are many things you can do to break the build, and I
don't think it's build.sh's job to patch them all.  Also, a patch in
build.sh doen't help when you run make directly.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index