1 1.2 rillig # $NetBSD: cmd-errors-lint.mk,v 1.2 2024/04/23 22:51:28 rillig Exp $ 2 1.1 rillig # 3 1.2 rillig # Demonstrate how errors in expressions 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.2 rillig all: undefined unclosed-expression unclosed-modifier unknown-modifier end 9 1.1 rillig 10 1.2 rillig # Undefined variables in expressions are not an error. They expand to empty 11 1.2 rillig # strings. 12 1.1 rillig undefined: 13 1.1 rillig : $@ ${UNDEFINED} 14 1.1 rillig 15 1.1 rillig # XXX: As of 2020-11-01, this obvious syntax error is not detected. 16 1.1 rillig # XXX: As of 2020-11-01, this command is executed even though it contains 17 1.1 rillig # parse errors. 18 1.2 rillig unclosed-expression: 19 1.1 rillig : $@ ${UNCLOSED 20 1.1 rillig 21 1.1 rillig # XXX: As of 2020-11-01, this obvious syntax error is not detected. 22 1.1 rillig # XXX: As of 2020-11-01, this command is executed even though it contains 23 1.1 rillig # parse errors. 24 1.1 rillig unclosed-modifier: 25 1.1 rillig : $@ ${UNCLOSED: 26 1.1 rillig 27 1.1 rillig # XXX: As of 2020-11-01, this command is executed even though it contains 28 1.1 rillig # parse errors. 29 1.1 rillig unknown-modifier: 30 1.1 rillig : $@ ${UNKNOWN:Z} 31 1.1 rillig 32 1.1 rillig end: 33 1.1 rillig : $@ 34