1# $NetBSD: cmd-errors-jobs.mk,v 1.4 2024/04/23 22:51:28 rillig Exp $ 2# 3# Demonstrate how errors in expressions affect whether the commands 4# are actually executed in jobs mode. 5 6.MAKEFLAGS: -j1 7 8all: undefined unclosed-expression unclosed-modifier unknown-modifier end 9 10# Undefined variables in expressions are not an error. They expand to empty 11# strings. 12# expect: : undefined--eol 13undefined: 14 : $@-${UNDEFINED}-eol 15 16# XXX: This command is executed even though it contains parse errors. 17# expect: make: in target "unclosed-expression": Unclosed variable "UNCLOSED" 18# expect: : unclosed-expression- 19unclosed-expression: 20 : $@-${UNCLOSED 21 22# XXX: This command is executed even though it contains parse errors. 23# expect: make: Unclosed expression, expecting '}' for "UNCLOSED" 24# expect: : unclosed-modifier- 25unclosed-modifier: 26 : $@-${UNCLOSED: 27 28# XXX: This command is executed even though it contains parse errors. 29# expect: make: in target "unknown-modifier": while evaluating variable "UNKNOWN": Unknown modifier "Z" 30# expect: : unknown-modifier--eol 31unknown-modifier: 32 : $@-${UNKNOWN:Z}-eol 33 34# expect: : end-eol 35end: 36 : $@-eol 37 38# XXX: Despite the parse errors, the exit status is 0. 39# expect: exit status 0 40