sys/conf: remove useless dollars from Makefile.kern.inc

When parsing a variable modifier such as :C or :S, all '$' but the very
last are silently swallowed.

See usr.bin/make/unit-tests/varmod-subst.mk for details.

Since August 2020, make has a strict lint mode that is activated by
passing it the option -dL.  In that mode, these redundant '$' are not
accepted anymore.
This commit is contained in:
rillig 2021-01-31 23:17:21 +00:00
parent 6dccb7a0e9
commit a9f4ffcede
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.kern.inc,v 1.276 2020/09/06 07:20:29 mrg Exp $
# $NetBSD: Makefile.kern.inc,v 1.277 2021/01/31 23:17:21 rillig Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@ -282,7 +282,7 @@ SYSTEM_LD_TAIL_STAGE2+= ${SYSTEM_LD_TAIL_EXTRA}
# Generate list of *.o files to pass to ${LD}, preserving order.
# x/y/z/a.[csS] -> a.[csS]
# a.[csS] -> a.o
OBJS= ${ALLFILES:C|^.*/([^/]*\.[csS])$$|\1|:C|^(.*)\.[csS]$$|\1.o|}
OBJS= ${ALLFILES:C|^.*/([^/]*\.[csS])$|\1|:C|^(.*)\.[csS]$|\1.o|}
CFILES= ${ALLFILES:M*.c}
SFILES= ${ALLFILES:M*.[sS]}
@ -297,7 +297,7 @@ SSRCS= ${_MD_SFILES} ${_SFILES}
SRCS= ${CSRCS} ${SSRCS}
.else # ___USE_SUFFIX_RULES___
OBJS= ${ALLFILES:C|\.[csS]$$|.o|}
OBJS= ${ALLFILES:C|\.[csS]$|.o|}
SRCS= ${ALLFILES:M*.[csS]}
.endif # ___USE_SUFFIX_RULES___