Subject: nbmake-xxx failed on OpenBSD
To: None <tech-toolchain@NetBSD.org>
From: Tetsuya Isaki <isaki@par.odn.ne.jp>
List: tech-toolchain
Date: 02/05/2005 14:53:40
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.
---
Tetsuya ISAKI <isaki@par.odn.ne.jp>


--- build.sh.ORG	Wed Oct 20 18:56:32 2004
+++ build.sh	Sat Feb  5 14:37:58 2005
@@ -515,7 +515,7 @@
 			eval ${optargcmd}; resolvepath
 			makeobjdir="${OPTARG}"
 			unsetmakeenv MAKEOBJDIRPREFIX
-			setmakeenv MAKEOBJDIR "\${.CURDIR:C,^$TOP,$OPTARG,}"
+			setmakeenv MAKEOBJDIR "\${.CURDIR:C+^$TOP+$OPTARG+}"
 			;;
 
 		-o)

 (before patch)
% uname -a
OpenBSD o36.xxxxxxxxxxxxxxxx.jp 3.6 MY#1 i386
% pwd
/kaki/home/isaki/n/src
% ./build.sh.ORG -m i386 -T ../o36/tools -O ../o36/obj makewrapper
===> build.sh.ORG command: ./build.sh.ORG -m i386 -T ../o36/tools -O ../o36/obj makewrapper
===> build.sh.ORG started: Sat Feb  5 13:27:57 JST 2005
===> MACHINE:          i386
===> MACHINE_ARCH:     i386
===> TOOLDIR path:     /kaki/home/isaki/n/src/../o36/tools
===> DESTDIR path:     /kaki/home/isaki/n/src/../o36/obj/destdir.i386
===> RELEASEDIR path:  /kaki/home/isaki/n/src/../o36/obj/releasedir
===> makewrapper:      /kaki/home/isaki/n/src/../o36/tools/bin/nbmake-i386
===> Updated /kaki/home/isaki/n/src/../o36/tools/bin/nbmake-i386
===> build.sh.ORG started: Sat Feb  5 13:27:57 JST 2005
===> build.sh.ORG ended:   Sat Feb  5 13:28:03 JST 2005
===> Summary of results:
         build.sh.ORG command: ./build.sh.ORG -m i386 -T ../o36/tools -O ../o36/obj makewrapper
         build.sh.ORG started: Sat Feb  5 13:27:57 JST 2005
         MACHINE:          i386
         MACHINE_ARCH:     i386
         TOOLDIR path:     /kaki/home/isaki/n/src/../o36/tools
         DESTDIR path:     /kaki/home/isaki/n/src/../o36/obj/destdir.i386
         RELEASEDIR path:  /kaki/home/isaki/n/src/../o36/obj/releasedir
         makewrapper:      /kaki/home/isaki/n/src/../o36/tools/bin/nbmake-i386
         Updated /kaki/home/isaki/n/src/../o36/tools/bin/nbmake-i386
         build.sh.ORG started: Sat Feb  5 13:27:57 JST 2005
         build.sh.ORG ended:   Sat Feb  5 13:28:03 JST 2005
===> .
% grep ^MAKEOBJDIR ../o36/tools/bin/nbmake-i386
MAKEOBJDIR='$.CURDIR:C'; export MAKEOBJDIR MAKEOBJDIR='$^/kaki/home/isaki/n/src'; export MAKEOBJDIR MAKEOBJDIR='$/kaki/home/isaki/n/src/../o36/obj'; export MAKEOBJDIR MAKEOBJDIR='$'; export MAKEOBJDIR
%

 (after patch)
% ./build.sh -m i386 -T ../o36/tools -O ../o36/obj makewrapper
===> build.sh command: ./build.sh -m i386 -T ../o36/tools -O ../o36/obj makewrapper
===> build.sh started: Sat Feb  5 13:32:17 JST 2005
===> MACHINE:          i386
===> MACHINE_ARCH:     i386
===> TOOLDIR path:     /kaki/home/isaki/n/src/../o36/tools
===> DESTDIR path:     /kaki/home/isaki/n/src/../o36/obj/destdir.i386
===> RELEASEDIR path:  /kaki/home/isaki/n/src/../o36/obj/releasedir
===> makewrapper:      /kaki/home/isaki/n/src/../o36/tools/bin/nbmake-i386
===> Updated /kaki/home/isaki/n/src/../o36/tools/bin/nbmake-i386
===> build.sh started: Sat Feb  5 13:32:17 JST 2005
===> build.sh ended:   Sat Feb  5 13:32:22 JST 2005
===> Summary of results:
         build.sh command: ./build.sh -m i386 -T ../o36/tools -O ../o36/obj makewrapper
         build.sh started: Sat Feb  5 13:32:17 JST 2005
         MACHINE:          i386
         MACHINE_ARCH:     i386
         TOOLDIR path:     /kaki/home/isaki/n/src/../o36/tools
         DESTDIR path:     /kaki/home/isaki/n/src/../o36/obj/destdir.i386
         RELEASEDIR path:  /kaki/home/isaki/n/src/../o36/obj/releasedir
         makewrapper:      /kaki/home/isaki/n/src/../o36/tools/bin/nbmake-i386
         Updated /kaki/home/isaki/n/src/../o36/tools/bin/nbmake-i386
         build.sh started: Sat Feb  5 13:32:17 JST 2005
         build.sh ended:   Sat Feb  5 13:32:22 JST 2005
===> .
% grep ^MAKEOBJDIR ../o36/tools/bin/nbmake-i386
MAKEOBJDIR='${.CURDIR:C+^/kaki/home/isaki/n/src+/kaki/home/isaki/n/src/../o36/obj+}'; export MAKEOBJDIR
%