2021-02-11 01:51:11 +00:00
|
|
|
# $NetBSD: lint.mk,v 1.4 2021/01/30 13:50:18 rillig Exp $
|
2020-09-05 16:11:04 +00:00
|
|
|
#
|
2021-02-11 01:51:11 +00:00
|
|
|
# Demonstrates stricter checks that are only enabled in lint mode, using the
|
|
|
|
# option -dL.
|
2020-09-05 16:11:04 +00:00
|
|
|
|
2021-02-11 01:51:11 +00:00
|
|
|
# Before main.c 1.421 from 2020-11-01, make exited successfully even though
|
|
|
|
# the error message had been issued as PARSE_FATAL. This was because back
|
|
|
|
# then, make checked for parse errors only after parsing each top-level
|
|
|
|
# makefile, in Parse_File. After that, when expanding variable expressions
|
|
|
|
# in shell commands, the parse errors were not checked again.
|
2020-09-05 16:11:04 +00:00
|
|
|
|
|
|
|
# Ouch: as of 2020-08-03, the variable is malformed and parsing stops
|
|
|
|
# for a moment, but is continued after the wrongly-guessed end of the
|
|
|
|
# variable, which echoes "y@:Q}".
|
|
|
|
|
2020-11-07 19:39:21 +00:00
|
|
|
.MAKEFLAGS: -dL
|
|
|
|
|
2020-09-05 16:11:04 +00:00
|
|
|
all: mod-loop-varname
|
|
|
|
|
|
|
|
mod-loop-varname:
|
|
|
|
@echo ${VAR:Uvalue:@${:Ubar:S,b,v,}@x${var}y@:Q}
|
|
|
|
@echo ${VAR:Uvalue:@!@x$!y@:Q} # surprisingly allowed
|