xref: /freebsd/contrib/bmake/unit-tests/cmd-errors-jobs.mk (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1# $NetBSD: cmd-errors-jobs.mk,v 1.2 2022/09/25 12:51:37 rillig Exp $
2#
3# Demonstrate how errors in variable expansions affect whether the commands
4# are actually executed in jobs mode.
5
6.MAKEFLAGS: -j1
7
8all: undefined unclosed-variable unclosed-modifier unknown-modifier end
9
10# Undefined variables are not an error.  They expand to empty strings.
11undefined:
12	: $@-${UNDEFINED}-eol
13
14# XXX: As of 2020-11-01, this command is executed even though it contains
15# parse errors.
16unclosed-variable:
17	: $@-${UNCLOSED
18
19# XXX: As of 2020-11-01, this command is executed even though it contains
20# parse errors.
21unclosed-modifier:
22	: $@-${UNCLOSED:
23
24# XXX: As of 2020-11-01, this command is executed even though it contains
25# parse errors.
26unknown-modifier:
27	: $@-${UNKNOWN:Z}-eol
28
29end:
30	: $@-eol
31
32# XXX: As of 2020-11-02, despite the parse errors, the exit status is 0.
33