1 1.5 rillig # $NetBSD: cmd-errors.mk,v 1.5 2022/09/25 12:51:37 rillig Exp $ 2 1.1 rillig # 3 1.1 rillig # Demonstrate how errors in variable expansions affect whether the commands 4 1.4 rillig # are actually executed in compat mode. 5 1.1 rillig 6 1.2 rillig all: undefined unclosed-variable unclosed-modifier unknown-modifier end 7 1.1 rillig 8 1.1 rillig # Undefined variables are not an error. They expand to empty strings. 9 1.1 rillig undefined: 10 1.5 rillig : $@-${UNDEFINED}-eol 11 1.1 rillig 12 1.1 rillig # XXX: As of 2020-11-01, this command is executed even though it contains 13 1.1 rillig # parse errors. 14 1.2 rillig unclosed-variable: 15 1.5 rillig : $@-${UNCLOSED 16 1.2 rillig 17 1.2 rillig # XXX: As of 2020-11-01, this command is executed even though it contains 18 1.2 rillig # parse errors. 19 1.2 rillig unclosed-modifier: 20 1.5 rillig : $@-${UNCLOSED: 21 1.1 rillig 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 unknown-modifier: 25 1.5 rillig : $@-${UNKNOWN:Z}-eol 26 1.1 rillig 27 1.1 rillig end: 28 1.5 rillig : $@-eol 29 1.2 rillig 30 1.2 rillig # XXX: As of 2020-11-02, despite the parse errors, the exit status is 0. 31