Sync with manuals from netbsd-8 branch.
[minix3.git] / usr.bin / make / unit-tests / cond2.mk
blobcccc9d6f8db9fad67035902d5d25d3c606c1535a
1 # $Id: cond2.mk,v 1.1 2015/05/05 21:51:09 sjg Exp $
3 TEST_UNAME_S= NetBSD
5 # this should be ok
6 X:= ${${TEST_UNAME_S} == "NetBSD":?Ok:fail}
7 .if $X == "Ok"
8 Y= good
9 .endif
10 # expect: Bad conditional expression ` == "empty"' in == "empty"?oops:ok
11 X:= ${${TEST_NOT_SET} == "empty":?oops:ok}
12 # expect: Malformed conditional ({TEST_TYPO} == "Ok")
13 .if {TEST_TYPO} == "Ok"
14 Y= oops
15 .endif
16 .if empty(TEST_NOT_SET)
17 Y!= echo TEST_NOT_SET is empty or not defined >&2; echo
18 .endif
19 # expect: Malformed conditional (${TEST_NOT_SET} == "empty")
20 .if ${TEST_NOT_SET} == "empty"
21 Y= oops
22 .endif
24 all:
25 @echo $@