Subject: bin/18325:
To: None <gnats-bugs@gnats.netbsd.org>
From: Nick Cuccia <cuccia@Talamasca.COM>
List: netbsd-bugs
Date: 09/18/2002 01:15:00
>Number:         18325
>Category:       bin
>Synopsis:       
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 18 01:16:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Nick Cuccia
>Release:        NetBSD 1.6H
>Organization:
The Talamasca.  We watch.  And we are always here.
>Environment:
	
	
System: NetBSD motherhouse 1.6H NetBSD 1.6H (NTALAMASCA) #0: Tue Sep 17 12:57:36 PDT 2002 cuccia@motherhouse:/build/src/sys/arch/i386/compile/NTALAMASCA i386
Architecture: i386
Machine: i386
>Description:
'make build' failed when attempting to clean toolchain/crunchgen.  Problem
was isolated to faulty conditionals in usr.bin/crunch/crunchgen's Makefile.
>How-To-Repeat:
	# cd /usr/src/usr.bin/crunch/crunchgen
	# make clean
>Fix:
The following patch fixes the problematic conditionals:

--- Makefile.orig	Wed Sep 18 00:43:21 2002
+++ Makefile	Wed Sep 18 01:00:10 2002
@@ -11,12 +11,12 @@
 .include <bsd.prog.mk>
 
 # Native tool -- key only off TOOLCHAIN_MISSING
-.if ${TOOLCHAIN_MISSING} != "yes"
+.if defined(TOOLCHAIN_MISSING) && ${TOOLCHAIN_MISSING} != "yes"
 CPPFLAGS+=	-DNEW_TOOLCHAIN
 .endif
 .else
 # Host tool -- We can also pay attention to EXTERNAL_TOOLCHAIN.
-.if ${TOOLCHAIN_MISSING} != "yes" || defined(EXTERNAL_TOOLCHAIN)
+.if (defined(TOOLCHAIN_MISSING && ${TOOLCHAIN_MISSING} != "yes") || defined(EXTERNAL_TOOLCHAIN)
 CPPFLAGS+=	-DNEW_TOOLCHAIN
 .endif
 .endif	# ! HOSTPROG
>Release-Note:
>Audit-Trail:
>Unformatted:
 no
 Problem with Makefile in /usr/src/usr.bin/crunch/crunchgen
 serious
 high
 sw-bug