xref: /freebsd/contrib/bmake/unit-tests/lint.mk (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1# $NetBSD: lint.mk,v 1.3 2020/09/15 16:22:04 rillig Exp $
2#
3# Demonstrates stricter checks that are only enabled in the lint mode,
4# using the -dL option.
5
6# Ouch: as of 2020-08-03, make exits successfully even though the error
7# message has been issued as PARSE_FATAL.
8
9# Ouch: as of 2020-08-03, the variable is malformed and parsing stops
10# for a moment, but is continued after the wrongly-guessed end of the
11# variable, which echoes "y@:Q}".
12
13.MAKEFLAGS: -dL
14
15all: mod-loop-varname
16
17mod-loop-varname:
18	@echo ${VAR:Uvalue:@${:Ubar:S,b,v,}@x${var}y@:Q}
19	@echo ${VAR:Uvalue:@!@x$!y@:Q}	# surprisingly allowed
20