From owner-freebsd-current Fri Nov 29 22:38:24 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6560837B401; Fri, 29 Nov 2002 22:38:23 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 332C943E4A; Fri, 29 Nov 2002 22:38:22 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id RAA31759; Sat, 30 Nov 2002 17:38:20 +1100 Date: Sat, 30 Nov 2002 17:52:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Poul-Henning Kamp Cc: current@FreeBSD.ORG Subject: Re: suggested WARNS makefile magic In-Reply-To: <1881.1038557926@critter.freebsd.dk> Message-ID: <20021130174805.T3454-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 29 Nov 2002, Poul-Henning Kamp wrote: > Right now, if I want to ensure that a particular program compiles > with a WARNS level of no less than 3, I have to put this in the > Makefile: > > WARNS?= 3 > .if ${WARNS} < 3 > WARNS= 3 > .endif Only in broken Makefiles. WARNS?= 3 should work in all cases (except when WARNS is set at a higher level, e.g., on the command line, in which case the setter really wants that level and individual makefiles should not override it). Makefiles may be broken by including ../Makefile.inc before setting WARNS, in which case the setting may be obained from ../Makefile.inc and any setting in the Makefile is bogus. Another common error is "WARNS= 3" to break any setting at a higher level. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message