aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/unit-tests/cmd-errors-jobs.mk
blob: 7a82c0b416e80d5e04c7c06efacdeb574af53fa7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# $NetBSD: cmd-errors-jobs.mk,v 1.4 2024/04/23 22:51:28 rillig Exp $
#
# Demonstrate how errors in expressions affect whether the commands
# are actually executed in jobs mode.

.MAKEFLAGS: -j1

all: undefined unclosed-expression unclosed-modifier unknown-modifier end

# Undefined variables in expressions are not an error.  They expand to empty
# strings.
# expect: : undefined--eol
undefined:
	: $@-${UNDEFINED}-eol

# XXX: This command is executed even though it contains parse errors.
# expect: make: in target "unclosed-expression": Unclosed variable "UNCLOSED"
# expect: : unclosed-expression-
unclosed-expression:
	: $@-${UNCLOSED

# XXX: This command is executed even though it contains parse errors.
# expect: make: Unclosed expression, expecting '}' for "UNCLOSED"
# expect: : unclosed-modifier-
unclosed-modifier:
	: $@-${UNCLOSED:

# XXX: This command is executed even though it contains parse errors.
# expect: make: in target "unknown-modifier": while evaluating variable "UNKNOWN": Unknown modifier "Z"
# expect: : unknown-modifier--eol
unknown-modifier:
	: $@-${UNKNOWN:Z}-eol

# expect: : end-eol
end:
	: $@-eol

# XXX: Despite the parse errors, the exit status is 0.
# expect: exit status 0