Subject: misc/4146: WARNS not unsettable in Makefiles
To: None <gnats-bugs@gnats.netbsd.org>
From: Erik Bertelsen <erik@erik-be.uni-c.dk>
List: netbsd-bugs
Date: 09/24/1997 12:25:37
>Number:         4146
>Category:       misc
>Synopsis:       WARNS not unsettable in Makefiles
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 24 01:35:01 1997
>Last-Modified:
>Originator:     Erik Bertelsen
>Organization:
	
>Release:        NetBSD-current 24 Sep 1997
>Environment:
	
System: NetBSD erik-be.uni-c.dk 1.2G NetBSD 1.2G (ERIKBE) #50: Tue Sep 23 19:46:21 MEST 1997 erik@erik-be.uni-c.dk:/sw/NetBSD/src/sys/arch/i386/compile/ERIKBE i386


>Description:
	When builds die, e.g. because of unresolved warnings in compilations,
	e.g. as today's example says:
		===> sbin/fsck
		cc -O  -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes  -c /sw/NetBSD/src/sbin/fsck/fsck.c
		cc1: warnings being treated as errors
		/sw/NetBSD/src/sbin/fsck/fsck.c:41: warning: `rcsid' defined but not used
	it would be nice to be able to say some thing along the line of

		cd sbin/fsck
		WARNS=0 make

	to get through the compilation here and now. This does, however,
	not work as I'd expect. The reason is that /usr/share/mk/bsd.sys.mk
	tests for WARNS being defined, not for its actual value

		grep WARNS /usr/share/mk/*
		/usr/share/mk/bsd.sys.mk:.if defined(WARNS)

	Furthermore /usr/src/sbin/Makefile.inc contains a WARNS=1, thus
	effectively blocking me from disabling WARNS for a single directory.

>How-To-Repeat:
	
>Fix:
	Change /usr/share/mk/bsd.sys.mk to test for the value of WARNS
	being non-zero, if it is defined at all. Maybe also set it to
	zero in the appropriate *.mk file if not set from a real
	Makefile{.inc}.


regards
Erik Bertelsen
>Audit-Trail:
>Unformatted: