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



> > 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?).

I define KERNOBJDIR and RELEASEDIR as environment variables.
They are relative to NETBSDSRCDIR.

Christos commit
http://mail-index.netbsd.org/source-changes/2010/03/26/msg008192.html

has no effect. I still see above error.

Moving his code part to the initialization part works. (See attached patch).

Christoph
Index: build.sh
===================================================================
RCS file: /cvsroot/src/build.sh,v
retrieving revision 1.232
diff -u -p -r1.232 build.sh
--- build.sh    26 Mar 2010 18:02:14 -0000      1.232
+++ build.sh    30 Mar 2010 06:16:59 -0000
@@ -259,6 +259,15 @@ initdefaults()
        #
        setmakeenv NETBSDSRCDIR "${TOP}"
 
+       # Make sure KERNOBJDIR is absolute if defined
+       #
+       case "${KERNOBJDIR}" in
+       ''|/*)  ;;
+       *)      KERNOBJDIR="${TOP}/${KERNOBJDIR}"
+               setmakeenv KERNOBJDIR "${KERNOBJDIR}"
+               ;;
+       esac
+
        # Find the version of NetBSD
        #
        DISTRIBVER="$(${HOST_SH} ${TOP}/sys/conf/osrelease.sh)"
@@ -1421,13 +1430,6 @@ getkernelconf()
        fi
        KERNCONFDIR="$(getmakevar KERNCONFDIR)"
        KERNOBJDIR="$(getmakevar KERNOBJDIR)"
-       case "${KERNOBJDIR}" in
-       ''|/*)  ;;
-       *)      KERNOBJDIR="${TOP}/${KERNOBJDIR}"
-               setmakeenv KERNOBJDIR "${KERNOBJDIR}"
-               ;;
-       esac
-
        case "${kernelconf}" in
        */*)
                kernelconfpath="${kernelconf}"


Home | Main Index | Thread Index | Old Index