Subject: pkg/19344: lang/nawk: Unquoted CFLAGS causes build failure (patch)
To: None <gnats-bugs@gnats.netbsd.org>
From: Christopher Richards <richards+netbsd@CS.Princeton.EDU>
List: netbsd-bugs
Date: 12/10/2002 22:46:59
>Number:         19344
>Category:       pkg
>Synopsis:       lang/nawk: Unquoted CFLAGS causes build failure (patch)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 10 19:48:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Christopher Richards
>Release:        NetBSD 1.6_STABLE
>Organization:
 
>Environment:
	
	
System: NetBSD zembla.Princeton.EDU 1.6_STABLE NetBSD 1.6_STABLE (ZEMBLA) #16: Mon Dec 2 21:44:56 EST 2002 richards@zembla.Princeton.EDU:/home/richards/x/src/kern i386
Architecture: i386
Machine: i386
>Description:
	
	If the user's CFLAGS contains spaces, lang/nawk fails to build
	due to improper quoting.

>How-To-Repeat:
	
	cd /usr/pkgsrc/lang/nawk; make CFLAGS="-O2 -g"

>Fix:
	Patch follows.  (Includes small manpage spelling fix also.)

Index: lang/nawk/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/nawk/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- lang/nawk/Makefile	2002/12/09 00:05:27	1.7
+++ lang/nawk/Makefile	2002/12/11 03:38:58
@@ -14,11 +14,12 @@
 
 WRKSRC=		${WRKDIR}
 MAKEFILE=	makefile
-MAKEFLAGS+=	CC=${CC} YACC=${YACC} CFLAGS=${CFLAGS}
+MAKEFLAGS+=	CC=${CC} YACC=${YACC} CFLAGS=${CFLAGS:Q}
 ALL_TARGET=	a.out
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/a.out ${PREFIX}/bin/nawk
-	${SED} -e 's|awk|nawk|g' ${WRKSRC}/awk.1 > ${PREFIX}/man/man1/nawk.1
+	${SED} -e 's|awk|nawk|g' -e 's|Awk|Nawk|g' \
+		${WRKSRC}/awk.1 > ${PREFIX}/man/man1/nawk.1
 
 .include "../../mk/bsd.pkg.mk"

>Release-Note:
>Audit-Trail:
>Unformatted: