Subject: Editing /usr/src/tools/Makefile
To: current-users <current-users@netbsd.org>
From: leam <leam@reuel.net>
List: current-users
Date: 09/06/2003 09:46:24
I kept getting errors about line 6 and 14 in /usr/src/tools/Makefile 
(Fresh from this morning)

###
# make
make: "/usr/src/tools/Makefile" line 6: Malformed conditional 
(${USE_TOOLS_TOOLCHAIN} != "yes")
make: "/usr/src/tools/Makefile" line 14: if-less endif
make: "/usr/src/tools/Makefile" line 14: Need an operator
make: Fatal errors encountered -- cannot continue
make: "/usr/share/mk/bsd.own.mk" line 107: warning: "cd /usr/src/tools 
&& make -V .OBJDIR" returned non-zero status
make: "/usr/src/tools/Makefile" line 6: Malformed conditional 
(${USE_TOOLS_TOOLCHAIN} != "yes")
make: "/usr/src/tools/Makefile" line 14: if-less endif
make: "/usr/src/tools/Makefile" line 14: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/src/tools
###

The original file included:

###
.if ${TOOLCHAIN_MISSING} != "yes"
.  if ${USE_TOOLS_TOOLCHAIN} != "yes"
TOOLCHAIN_BITS= binutils .WAIT gcc
.  else
TOOLCHAIN_BITS= toolchain
.  endif
TOOLCHAIN_BITS+= .WAIT dbsym mdsetimage
# XXX Eventually, we want to be able to build dbsym and mdsetimage
# XXX if EXTERNAL_TOOLCHAIN is set.
.endif
###

I commented out the second "if" stanze ecept for the first 
TOOLCHAIN_BITS since I'm using gcc3. Or so I hope.:

###
.if ${TOOLCHAIN_MISSING} != "yes"
#.if ${USE_TOOLS_TOOLCHAIN} = "no"
TOOLCHAIN_BITS= binutils .WAIT gcc
#.else
#TOOLCHAIN_BITS= toolchain
#.endif
TOOLCHAIN_BITS+= .WAIT dbsym mdsetimage
# XXX Eventually, we want to be able to build dbsym and mdsetimage
# XXX if EXTERNAL_TOOLCHAIN is set.
.endif
###

Is there a better solution?

ciao!

leam