Module Name: src
Committed By: rillig
Date: Sat Aug 27 21:49:33 UTC 2022
Modified Files:
src/sys/conf: lint.mk
Log Message:
sys/conf/link.mk: clean up
The modifier ':C' did not need the modifier 'g', as there couldn't ever
be more than one match per word. Using the modifier ':from=to' is easier
to read.
Align the variable assignments. There was no point in having 3 different
alignment styles in the same file.
Remove underscore from .for iteration variable, as it is not needed.
No functional change.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/conf/lint.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/conf/lint.mk
diff -u src/sys/conf/lint.mk:1.4 src/sys/conf/lint.mk:1.5
--- src/sys/conf/lint.mk:1.4 Sun May 2 20:11:43 2021
+++ src/sys/conf/lint.mk Sat Aug 27 21:49:33 2022
@@ -1,4 +1,4 @@
-# $NetBSD: lint.mk,v 1.4 2021/05/02 20:11:43 rillig Exp $
+# $NetBSD: lint.mk,v 1.5 2022/08/27 21:49:33 rillig Exp $
##
## lint
@@ -7,22 +7,22 @@
.if !target(lint)
.PATH: $S
ALLSFILES?= ${MD_SFILES} ${SFILES}
-LINTSTUBS?= ${ALLSFILES:T:R:C/^.*$/LintStub_&.c/g}
+LINTSTUBS?= ${ALLSFILES:T:R:%=LintStub_%.c}
KERNLINTFLAGS?= -bceghnxzFS
NORMAL_LN?= ${LINT} ${KERNLINTFLAGS} ${CPPFLAGS:M-[IDU]*} -o $@ -i $<
-_lsrc=${CFILES} ${LINTSTUBS} ${MI_CFILES} ${MD_CFILES}
-LOBJS?= ${_lsrc:T:S/.c$/.ln/g} ${LIBKERNLN} ${SYSLIBCOMPATLN}
+_lsrc= ${CFILES} ${LINTSTUBS} ${MI_CFILES} ${MD_CFILES}
+LOBJS?= ${_lsrc:T:.c=.ln} ${LIBKERNLN} ${SYSLIBCOMPATLN}
-.for _sfile in ${ALLSFILES}
-LintStub_${_sfile:T:R}.c: ${_sfile} assym.h
+.for sfile in ${ALLSFILES}
+LintStub_${sfile:T:R}.c: ${sfile} assym.h
${_MKTARGET_COMPILE}
- ${CC} -E -C ${AFLAGS} ${CPPFLAGS} ${_sfile} | \
+ ${CC} -E -C ${AFLAGS} ${CPPFLAGS} ${sfile} | \
${TOOL_AWK} -f $S/kern/genlintstub.awk >${.TARGET}
.endfor
-.for _cfile in ${CFILES} ${LINTSTUBS} ${MI_CFILES} ${MD_CFILES}
-${_cfile:T:R}.ln: ${_cfile}
+.for cfile in ${CFILES} ${LINTSTUBS} ${MI_CFILES} ${MD_CFILES}
+${cfile:T:R}.ln: ${cfile}
${_MKTARGET_COMPILE}
${NORMAL_LN}
.endfor