Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make/unit-tests make(1): extend test for the exists ...
details: https://anonhg.NetBSD.org/src/rev/09eee90a9529
branches: trunk
changeset: 937880:09eee90a9529
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Aug 28 12:59:36 2020 +0000
description:
make(1): extend test for the exists function in conditions
diffstat:
usr.bin/make/unit-tests/cond-func-exists.mk | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diffs (38 lines):
diff -r d0b572c3dace -r 09eee90a9529 usr.bin/make/unit-tests/cond-func-exists.mk
--- a/usr.bin/make/unit-tests/cond-func-exists.mk Fri Aug 28 12:56:19 2020 +0000
+++ b/usr.bin/make/unit-tests/cond-func-exists.mk Fri Aug 28 12:59:36 2020 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index