Subject: misc/6046: New CWARNFLAGS not unsettable
To: None <gnats-bugs@gnats.netbsd.org>
From: Erik Bertelsen <erik@aarhus1.uni-c.dk>
List: netbsd-bugs
Date: 08/26/1998 16:15:25
>Number:         6046
>Category:       misc
>Synopsis:       New CWARNFLAGS not unsettable
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 26 07:35:01 1998
>Last-Modified:
>Originator:     Erik Bertelsen
>Organization:
	
>Release:        NetBSD-current 26 Aug 1998
>Environment:
	
System: NetBSD aarhus1.uni-c.dk 1.3G NetBSD 1.3G (AARHUS1) #68: Wed Aug 26 13:39:16 MEST 1998 erik@aarhus1.uni-c.dk:/home/src/sys/arch/pmax/compile/AARHUS1 pmax


>Description:
	In today's sup a new CWARNFLAGS was added to bsd.sys.mk to control
	the usage of -Werror.

	The problem is that the -Werror is added to the previous value,
	instead of being set only if it is not already set.

	This makes it impossible to unset -Werror from the command line.

>How-To-Repeat:
>Fix:
Index: bsd.sys.mk
===================================================================
RCS file: /sw/cvs-base/src/share/mk/bsd.sys.mk,v
retrieving revision 1.1.1.18
diff -c -r1.1.1.18 bsd.sys.mk
*** bsd.sys.mk	1998/08/26 14:31:28	1.1.1.18
--- bsd.sys.mk	1998/08/26 16:18:57
***************
*** 5,11 ****
  .if defined(WARNS) && ${WARNS} == 1
  CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
  .endif
! CWARNFLAGS+= -Werror
  CFLAGS+= ${CWARNFLAGS}
  
  .if defined(DESTDIR)
--- 5,11 ----
  .if defined(WARNS) && ${WARNS} == 1
  CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
  .endif
! CWARNFLAGS?= -Werror
  CFLAGS+= ${CWARNFLAGS}
  
  .if defined(DESTDIR)


regards
Erik Bertelsen
>Audit-Trail:
>Unformatted: