Subject: Re: nbmake-xxx failed on OpenBSD
To: Simon J. Gerraty <sjg@crufty.net>
From: Tetsuya Isaki <isaki@par.odn.ne.jp>
List: tech-toolchain
Date: 02/11/2005 16:41:22
Hi,
I'm sorry, which Makefile should I put into ?
---
Tetsuya Isaki <isaki@par.odn.ne.jp / isaki@NetBSD.org>
At Thu, 10 Feb 2005 22:24:11 -0800,
Simon J. Gerraty wrote:
>
> Cool, so it looks like a shell bug.
>
> You should be able to build the NetBSD shell or pdksh, and tell bmake
> to use that. eg.
>
> .SHELL: name=ksh path=/bin/ksh hasErrCtl=true check="set -e" ignore="set +e" quiet="set +v" filter="set +v" echo="set -v" echoFlag=v errFlag=e
>
> Hope that helps.
> --sjg
>
> On Sun, 06 Feb 2005 14:13:48 +0900, Tetsuya Isaki writes:
> >Hi,
> >
> >At Sat, 5 Feb 2005 09:08:42 -0800 (PST),
> >Simon J. Gerraty wrote:
> >>
> >> >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,}
> >
> >Your script show the same result both OpenBSD and NetBSD.
> >But I got different result by the following script.
> >
> >% cat a
> >#! /usr/bin/env sh
> >TOP=/my/src
> >OPTARG=/my/obj
> >
> >setmakeenv()
> >{
> > set -x
> > eval "$1='$2'; export $1"
> > makeenv="${makeenv} $1"
> >}
> >
> >setmakeenv MAKEOBJDIR "\${.CURDIR:C,^$TOP,$OPTARG,}"
> >
> >f=MAKEOBJDIR
> >eval echo "${f}=\'\$$(echo ${f})\'\;\ export\ ${f}"
> >%
> >
> >(On NetBSD 2.0_RC4)
> >% uname -a
> >NetBSD mai.xxxxxxxxxxxxxxxx.jp 2.0_RC4 NetBSD 2.0_RC4 (MAI) #2: Thu Jan 6 11:
> >46:11 JST 2005 root@mai.xxxxxxxxxxxxxxxx.jp:/usr/src/sys/arch/i386/compile/MA
> >I i386
> >% ./a
> >+ eval MAKEOBJDIR='${.CURDIR:C,^/my/src,/my/obj,}'; export MAKEOBJDIR
> >+ MAKEOBJDIR=${.CURDIR:C,^/my/src,/my/obj,}
> >+ export MAKEOBJDIR
> >+ makeenv= MAKEOBJDIR
> >+ f=MAKEOBJDIR
> >+ echo MAKEOBJDIR
> >+ eval echo MAKEOBJDIR=\'$MAKEOBJDIR\'\;\ export\ MAKEOBJDIR
> >+ echo MAKEOBJDIR='${.CURDIR:C,^/my/src,/my/obj,}'; export MAKEOBJDIR
> >MAKEOBJDIR='${.CURDIR:C,^/my/src,/my/obj,}'; export MAKEOBJDIR
> >%
> >
> >(On OpenBSD 3.6)
> >% ./a
> >+ eval MAKEOBJDIR='${.CURDIR:C,^/my/src,/my/obj,}'; export MAKEOBJDIR
> >+ MAKEOBJDIR=${.CURDIR:C,^/my/src,/my/obj,}
> >+ export MAKEOBJDIR
> >+ makeenv= MAKEOBJDIR
> >MAKEOBJDIR='$.CURDIR:C'; export MAKEOBJDIR MAKEOBJDIR='$^/my/src'; export MAKE
> >OBJDIR MAKEOBJDIR='$/my/obj'; export MAKEOBJDIR MAKEOBJDIR='$'; export MAKEOBJ
> >DIR
> >%
> >---
> >Tetsuya ISAKI <isaki@par.odn.ne.jp / isaki@NetBSD.org>