From 08b443022e01b95bc56afb69ed00c3bfc9e631ad Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Mon, 3 Dec 2001 22:31:09 +0000 Subject: [PATCH] Unbreak "make lint" for programs and "make llib-l${LIB}.ln" for libraries a little by not passing all of ${CFLAGS} to lint. Pass only options matching -[DIU]*. The important -nostdinc option can't be passed like I first thought because lint misinterprets as "-n -o stdinc". The unimportant -B* option can't be passed because lint doesn't support it. Otherwise, we pass the same options as to mkdep, exept for a bug in the latter: -U* is not passed. All this depends on option args not being separated from option flags by a space. --- share/mk/bsd.lib.mk | 2 +- share/mk/bsd.prog.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 3920b28b384..ca8807ed1bb 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -229,7 +229,7 @@ lib${LIB}_pic.a:: ${SOBJS} .endif llib-l${LIB}.ln: ${SRCS} - ${LINT} -C${LIB} ${CFLAGS} ${.ALLSRC:M*.c} + ${LINT} -C${LIB} ${CFLAGS:M-[DIU]*} ${.ALLSRC:M*.c} .if !target(clean) clean: _SUBDIR diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 4c790c2c181..670f5a2b585 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -178,7 +178,7 @@ distribute: _SUBDIR .if !target(lint) lint: ${SRCS} _SUBDIR .if defined(PROG) - @${LINT} ${LINTFLAGS} ${.ALLSRC} | more 2>&1 + ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} | more 2>&1 .endif .endif -- 2.45.2