Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/conf sys/conf/lint.mk: a small step for linting the kernel
details: https://anonhg.NetBSD.org/src/rev/dce5e87850ef
branches: trunk
changeset: 378981:dce5e87850ef
user: rillig <rillig%NetBSD.org@localhost>
date: Sun May 02 19:29:30 2021 +0000
description:
sys/conf/lint.mk: a small step for linting the kernel
Due to the missing path, the following commands had failed:
$ cd src/sys/arch/amd64/compile/GENERIC
$ nbmake-amd64-lint kern_exec.ln
nbmake: don't know how to make kern/kern_exec.c. Stop
After fixing the path, "make kern_exec.ln" fails with:
sys/kern/kern_exec.c(65): error: syntax error '"' [249]
The affected line contains:
__KERNEL_RCSID(0, "...");
The macro __KERNEL_RCSID expands to __asm("some strings"). Since
KERNLINTFLAGS is missing the -g, lint does not recognize __asm as
keyword and tries to parse it as an identifier instead, expecting a
variable or function declaration.
diffstat:
sys/conf/lint.mk | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (16 lines):
diff -r 3be13d9804d1 -r dce5e87850ef sys/conf/lint.mk
--- a/sys/conf/lint.mk Sun May 02 19:13:43 2021 +0000
+++ b/sys/conf/lint.mk Sun May 02 19:29:30 2021 +0000
@@ -1,10 +1,11 @@
-# $NetBSD: lint.mk,v 1.1 2015/08/29 16:27:07 uebayasi Exp $
+# $NetBSD: lint.mk,v 1.2 2021/05/02 19:29:30 rillig Exp $
##
## lint
##
.if !target(lint)
+.PATH: $S
ALLSFILES?= ${MD_SFILES} ${SFILES}
LINTSTUBS?= ${ALLSFILES:T:R:C/^.*$/LintStub_&.c/g}
KERNLINTFLAGS?= -bcehnxzFS
Home |
Main Index |
Thread Index |
Old Index