Module Name: src Committed By: rillig Date: Thu Oct 31 21:53:40 UTC 2024
Modified Files: src/share/mk: bsd.lib.mk Log Message: bsd.lib.mk: in 'lint' target, don't list defined but unused symbols When building a library, it is common that there are many symbols that are defined but not used, as that's exactly the point of a library. When running the 'lint' target manually, don't complain about these symbols, by creating a "dummy" library. That dummy library is not installed anywhere. For libxcb, the output shrinks from more than 3000 lines down to 5. To generate a diff of this commit: cvs rdiff -u -r1.408 -r1.409 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.408 src/share/mk/bsd.lib.mk:1.409 --- src/share/mk/bsd.lib.mk:1.408 Thu Oct 31 15:04:11 2024 +++ src/share/mk/bsd.lib.mk Thu Oct 31 21:53:40 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.408 2024/10/31 15:04:11 riastradh Exp $ +# $NetBSD: bsd.lib.mk,v 1.409 2024/10/31 21:53:40 rillig Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include <bsd.init.mk> @@ -722,9 +722,10 @@ ${_LIB.ln}: ${LOBJS} .endif .endif # } +# Only intended to be invoked manually, not as part of dependall. lint: ${LOBJS} .if defined(LOBJS) && !empty(LOBJS) - ${LINT} ${LINTFLAGS} ${LOBJS} + ${LINT} ${LINTFLAGS} -Cmanual-lint ${LOBJS} .endif @@ -751,7 +752,7 @@ LIBCLEANFILES4+= ${_LIB_pic.a} LIBCLEANFILES4+= ${_LIB.so}.* ${_LIB.so} ${_LIB.so.debug} .endif LIBCLEANFILES4+= ${SOBJS} ${SOBJS:=.tmp} -LIBCLEANFILES5+= ${_LIB.ln} ${LOBJS} +LIBCLEANFILES5+= ${_LIB.ln} ${LOBJS} llib-lmanual-lint.ln .if !target(libinstall) # { # Make sure it gets defined, in case MKPIC==no && MKLINKLIB==no