From owner-freebsd-arch Thu Sep 19 13:20:44 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 016CC37B401 for ; Thu, 19 Sep 2002 13:20:42 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD89843E6A for ; Thu, 19 Sep 2002 13:20:40 -0700 (PDT) (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 GAA12738; Fri, 20 Sep 2002 06:20:31 +1000 Date: Fri, 20 Sep 2002 06:29:10 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Mark Murray Cc: arch@FreeBSD.ORG Subject: Re: More lint work for share/mk/ (review, please) In-Reply-To: <200209191559.g8JFx27s001093@grimreaper.grondar.org> Message-ID: <20020920054221.E2677-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 19 Sep 2002, Mark Murray wrote: > I've been running the attached patches for a while now, and they > allow me to complete make worlds with a commercial lint, a ports > lint and freebsd "base" lint. > ... > They also allow parts of the tree to be "notlinted". The mechanism > for this may look clunky, and I'll listen to folks who feel that it > needs to be done differently. There are two knobs; WANT_LINT, which > is a make.conf thing, and turns on overall linting. The other is > NOLINT, and this is supposed to be put into individual Makefiles > to kill copious lint output from code out of our control (like > GNU stuff, other contrib/ code and so on). Wouldn't `.undef WANT_LINT' in individual Makefiles be better than another knob? > ... % Index: bsd.prog.mk % =================================================================== % RCS file: /home/ncvs/src/share/mk/bsd.prog.mk,v % retrieving revision 1.127 % diff -u -d -r1.127 bsd.prog.mk % --- bsd.prog.mk 17 Sep 2002 01:48:53 -0000 1.127 % +++ bsd.prog.mk 17 Sep 2002 08:33:51 -0000 % .... % @@ -157,9 +157,9 @@ % .endif % % .if !target(lint) % -lint: ${SRCS} % +lint: ${SRCS:M*.c} % .if defined(PROG) % - ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} | more 2>&1 % + ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} I wonder what this pipeline is for. I once thought that it was to combine stdout with stderr to work around the bug that lint prints some messages on stderr, but it is wrong for that -- the correct way to combine stdin with stderr is "2>&1" before any pipe. % .endif % .endif % % Index: bsd.sys.mk % =================================================================== % RCS file: /home/ncvs/src/share/mk/bsd.sys.mk,v % retrieving revision 1.10 % diff -u -d -r1.10 bsd.sys.mk % --- bsd.sys.mk 7 Jul 2002 18:47:52 -0000 1.10 % +++ bsd.sys.mk 12 Sep 2002 20:54:10 -0000 % @@ -29,7 +29,7 @@ % . endif % # BDECFLAGS % . if ${WARNS} > 5 % -CFLAGS += -ansi -pedantic -Wbad-function-cast -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls % +CFLAGS += -ansi -pedantic -Wbad-function-cast -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-long-long % . endif % . if ${WARNS} > 1 && ${WARNS} < 5 % # XXX Delete -Wuninitialized by default for now -- the compiler doesn't No thanks. This breaks gcc's warning. -ansi means C90 (-std=c89), and this standard doesn't have long long. Of course, programs not written in C90 can't be compiled with this warning level. % Index: sys.mk % =================================================================== % RCS file: /home/ncvs/src/share/mk/sys.mk,v % retrieving revision 1.63 % diff -u -d -r1.63 sys.mk % --- sys.mk 17 Sep 2002 01:48:54 -0000 1.63 % +++ sys.mk 17 Sep 2002 08:33:52 -0000 % @@ -132,6 +132,14 @@ % % # DOUBLE SUFFIX RULES % % +.c.ln: % + ${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} || \ % + touch ${.TARGET} % + % +.cc.ln .C.ln .cpp.ln .cxx.ln: % + ${LINT} ${LINTOBJFLAGS} ${CXXFLAGS:M-[DIU]*} ${.IMPSRC} || \ % + touch ${.TARGET} % + % .c.o: % ${CC} ${CFLAGS} -c ${.IMPSRC} % Non-POSIX rules shouldn't be duplicated in the POSIX section. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message