@@ -1,5 +1,7 @@
: undefined
-: unclosed
+make: Unclosed variable "UNCLOSED"
+: unclosed-variable
+: unclosed-modifier
make: Unknown modifier 'Z'
: unknown-modifier
: end
@@ -1,9 +1,9 @@
-# $NetBSD: cmd-errors.mk,v 1.1 2020/11/02 20:20:42 rillig Exp $
+# $NetBSD: cmd-errors.mk,v 1.2 2020/11/02 20:37:50 rillig Exp $
#
# Demonstrate how errors in variable expansions affect whether the commands
# are actually executed.
-all: undefined unclosed unknown-modifier end
+all: undefined unclosed-variable unclosed-modifier unknown-modifier end
# Undefined variables are not an error. They expand to empty strings.
undefined:
@@ -12,7 +12,13 @@
# XXX: As of 2020-11-01, this obvious syntax error is not detected.
# XXX: As of 2020-11-01, this command is executed even though it contains
# parse errors.
-unclosed:
+unclosed-variable:
+ : $@ ${UNCLOSED
+
+# XXX: As of 2020-11-01, this obvious syntax error is not detected.
+# XXX: As of 2020-11-01, this command is executed even though it contains
+# parse errors.
+unclosed-modifier:
: $@ ${UNCLOSED:
# XXX: As of 2020-11-01, this command is executed even though it contains
@@ -22,3 +28,5 @@
end:
: $@
+
+# XXX: As of 2020-11-02, despite the parse errors, the exit status is 0.