1 1.1 rillig # $NetBSD: cmd-errors-lint.mk,v 1.1 2020/11/02 20:43:27 rillig Exp $ 2 1.1 rillig # 3 1.1 rillig # Demonstrate how errors in variable expansions affect whether the commands 4 1.1 rillig # are actually executed. 5 1.1 rillig 6 1.1 rillig .MAKEFLAGS: -dL 7 1.1 rillig 8 1.1 rillig all: undefined unclosed-variable unclosed-modifier unknown-modifier end 9 1.1 rillig 10 1.1 rillig # Undefined variables are not an error. They expand to empty strings. 11 1.1 rillig undefined: 12 1.1 rillig : $@ ${UNDEFINED} 13 1.1 rillig 14 1.1 rillig # XXX: As of 2020-11-01, this obvious syntax error is not detected. 15 1.1 rillig # XXX: As of 2020-11-01, this command is executed even though it contains 16 1.1 rillig # parse errors. 17 1.1 rillig unclosed-variable: 18 1.1 rillig : $@ ${UNCLOSED 19 1.1 rillig 20 1.1 rillig # XXX: As of 2020-11-01, this obvious syntax error is not detected. 21 1.1 rillig # XXX: As of 2020-11-01, this command is executed even though it contains 22 1.1 rillig # parse errors. 23 1.1 rillig unclosed-modifier: 24 1.1 rillig : $@ ${UNCLOSED: 25 1.1 rillig 26 1.1 rillig # XXX: As of 2020-11-01, this command is executed even though it contains 27 1.1 rillig # parse errors. 28 1.1 rillig unknown-modifier: 29 1.1 rillig : $@ ${UNKNOWN:Z} 30 1.1 rillig 31 1.1 rillig end: 32 1.1 rillig : $@ 33