aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/cond-func-defined.mk
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2020-11-20 03:54:37 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2020-11-20 03:54:37 +0000
commit1b65f0bd2bda7121a90f8cb4c1cacaa20f1b681d (patch)
tree90c374b8513ec5109e1ec4e2228e2edf648e8756 /unit-tests/cond-func-defined.mk
parent302da1a3d35c15cb29d76e0a939f8bcb13f7ad80 (diff)
Notes
Diffstat (limited to 'unit-tests/cond-func-defined.mk')
-rw-r--r--unit-tests/cond-func-defined.mk21
1 files changed, 20 insertions, 1 deletions
diff --git a/unit-tests/cond-func-defined.mk b/unit-tests/cond-func-defined.mk
index ec4feae05839..2aa49ccbf147 100644
--- a/unit-tests/cond-func-defined.mk
+++ b/unit-tests/cond-func-defined.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cond-func-defined.mk,v 1.5 2020/10/24 08:46:08 rillig Exp $
+# $NetBSD: cond-func-defined.mk,v 1.7 2020/11/15 14:07:53 rillig Exp $
#
# Tests for the defined() function in .if conditions.
@@ -29,5 +29,24 @@ ${:UA B}= variable name with spaces
. error
.endif
+# Parse error: missing closing parenthesis; see ParseFuncArg.
+.if defined(DEF
+. error
+.else
+. error
+.endif
+
+# Variables from .for loops are not defined.
+# See directive-for.mk for more details.
+.for var in value
+. if defined(var)
+. error
+. else
+. info In .for loops, variable expressions for the loop variables are
+. info substituted at evaluation time. There is no actual variable
+. info involved, even if it feels like it.
+. endif
+.endfor
+
all:
@:;