Date: Fri, 20 Sep 2002 06:29:10 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Mark Murray <mark@grondar.za> Cc: arch@FreeBSD.ORG Subject: Re: More lint work for share/mk/ (review, please) Message-ID: <20020920054221.E2677-100000@gamplex.bde.org> In-Reply-To: <200209191559.g8JFx27s001093@grimreaper.grondar.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020920054221.E2677-100000>
