Module Name: src
Committed By: rillig
Date: Fri Aug 28 12:59:36 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: cond-func-exists.mk
Log Message:
make(1): extend test for the exists function in conditions
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/cond-func-exists.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/unit-tests/cond-func-exists.mk
diff -u src/usr.bin/make/unit-tests/cond-func-exists.mk:1.3 src/usr.bin/make/unit-tests/cond-func-exists.mk:1.4
--- src/usr.bin/make/unit-tests/cond-func-exists.mk:1.3 Sun Aug 23 14:07:20 2020
+++ src/usr.bin/make/unit-tests/cond-func-exists.mk Fri Aug 28 12:59:36 2020
@@ -1,9 +1,8 @@
-# $NetBSD: cond-func-exists.mk,v 1.3 2020/08/23 14:07:20 rillig Exp $
+# $NetBSD: cond-func-exists.mk,v 1.4 2020/08/28 12:59:36 rillig Exp $
#
# Tests for the exists() function in .if conditions.
-.if exists(.)
-.else
+.if !exists(.)
.error
.endif
@@ -24,15 +23,18 @@
.error
.endif
-.if exists(${:U.})
-.else
+.if !exists(${:U.})
.error
.endif
# The argument to the function can have several variable expressions.
# See cond-func.mk for the characters that cannot be used directly.
-.if exists(${.PARSEDIR}/${.PARSEFILE})
-.else
+.if !exists(${.PARSEDIR}/${.PARSEFILE})
+.error
+.endif
+
+# Whitespace is trimmed on both sides of the function argument.
+.if !exists( . )
.error
.endif