Subject: Re: nbmake-xxx failed on OpenBSD
To: Tetsuya Isaki <isaki@par.odn.ne.jp>
From: Simon J. Gerraty <sjg@crufty.net>
List: tech-toolchain
Date: 02/05/2005 09:08:42
>I'm trying to build netbsd-2-0 on OpenBSD/i386-3.6.
>But MAKEOBJDIR in tools/bin/nbmake-xxx is broken.

>It seems different interpretation for ','(comma) in
>variable?  I'm not sure especially '+'(plus) is good
>separator or not..  Anyway this patch works fine for
>me.

First, can we establish that your shell is doing it's part:
What do you get for the following script:

TOP=/my/src
OPTARG=/my/obj

setmakeenv()
{
    set -x
    eval "$1='$2'; export $1"
    makeenv="${makeenv} $1"
}

setmakeenv MAKEOBJDIR "\${.CURDIR:C,^$TOP,$OPTARG,}"

If I run that with sh, ksh on Net or Free (plus bash and zsh) I see:

MAKEOBJDIR=${.CURDIR:C,^/my/src,/my/obj,}

--sjg