Subject: strange build.sh error
To: None <current-users@netbsd.org, port-macppc@netbsd.org>
From: Xavier HUMBERT <xavier.humbert@xavhome.fr.eu.org>
List: current-users
Date: 04/08/2003 15:46:23
This error occurs only on macppc. The same hierarchy builds and
crossbuilds  fine on i386

I have my build tree this way
[root@doriath src]# ll /usr/
total 10856
drwxr-xr-x   2 root  wheel       512 Apr  8 15:28 build.macppc/
drwxr-xr-x   2 root  wheel       512 Apr  7 12:44 obj.macppc/
drwxr-xr-x  21 root  wheel       512 Apr  8 15:30 src/
lrwxr-xr-x   1 root  wheel        13 Apr  3 09:16 tools@ -> tools.macppc/
drwxr-xr-x  10 root  wheel       512 Apr  2 23:17 tools.macppc/
(other directories snipped)

When called with explicit TOOLDIR, I got an error :

>[root@doriath src]# ./build.sh -n -u -m macppc -D /usr/build.macppc \
>    -O /usr/obj.macppc -T /usr/tools.macppc tools
>===> build.sh command: ./build.sh -n -u -m macppc -D /usr/build.macppc \
>    -O /usr/obj.macppc -T /usr/tools.macppc tools
>===> build.sh started: Tue Apr  8 15:32:57 CEST 2003
>mkdir -p /usr/obj.macppc
>/usr/tools.macppc/bin/nbmake: 1: Syntax error: "(" unexpected
>echo ===> DESTDIR path: 
>/usr/tools.macppc/bin/nbmake: 1: Syntax error: "(" unexpected
>echo ===> TOOLDIR path: 
>
>ERROR: TOOLDIR '' invalid
>*** BUILD ABORTED ***


OTOH, when I let the sytem use default TOOLDIR, it goes right :

>[root@doriath src]# ./build.sh -n -u -m macppc -D /usr/build.macppc \
>    -O /usr/obj.macppc  tools
>===> build.sh command: ./build.sh -n -u -m macppc -D /usr/build.macppc \
>    -O /usr/obj.macppc tools
>===> build.sh started: Tue Apr  8 15:33:06 CEST 2003
>echo ===> Bootstrapping nbmake
>mkdir /tmp/nbbuild17249
>cd /tmp/nbbuild17249
>env CC=cc CPPFLAGS= CFLAGS=-O LDFLAGS= /usr/src/tools/make/configure
>sh buildmake.sh
>[...snip...]


Note that these tests use the -n flag for ./build.sh It means that the
error occurs very early in the process. I simply don't understand where
and why.

My mk.conf file contains only

OBJMACHINE=yes
MKOBJDIRS=yes
NOCLEANDIR=yes
MKHOSTOBJ=no
USE_NEW_TOOLCHAIN=yes
TOOLDIR=/usr/tools

Commenting TOOLDIR does not change anything

Thanks,


-- 
Xavier HUMBERT  -  Systemes et Reseaux     |     labo-info@injep.fr
INJEP                                      |     humbert@injep.fr