tools/llvm: Do not build with symbols
[minix3.git] / tests / usr.bin / make / d_cond1.mk
bloba058ac6840ddf474e92ad66ed4b55fa34ba71a9b
1 # $NetBSD: d_cond1.mk,v 1.1 2012/03/17 16:33:14 jruoho Exp $
3 # hard code these!
4 TEST_UNAME_S= NetBSD
5 TEST_UNAME_M= sparc
6 TEST_MACHINE= i386
8 .if ${TEST_UNAME_S}
9 Ok=var,
10 .endif
11 .if ("${TEST_UNAME_S}")
12 Ok+=(\"var\"),
13 .endif
14 .if (${TEST_UNAME_M} != ${TEST_MACHINE})
15 Ok+=(var != var),
16 .endif
17 .if ${TEST_UNAME_M} != ${TEST_MACHINE}
18 Ok+= var != var,
19 .endif
20 .if !((${TEST_UNAME_M} != ${TEST_MACHINE}) && defined(X))
21 Ok+= !((var != var) && defined(name)),
22 .endif
23 # from bsd.obj.mk
24 MKOBJ?=no
25 .if ${MKOBJ} == "no"
26 o= no
27 Ok+= var == "quoted",
28 .else
29 .if defined(notMAKEOBJDIRPREFIX) || defined(norMAKEOBJDIR)
30 .if defined(notMAKEOBJDIRPREFIX)
31 o=${MAKEOBJDIRPREFIX}${__curdir}
32 .else
33 o= ${MAKEOBJDIR}
34 .endif
35 .endif
36 o= o
37 .endif
39 # repeat the above to check we get the same result
40 .if ${MKOBJ} == "no"
41 o2= no
42 .else
43 .if defined(notMAKEOBJDIRPREFIX) || defined(norMAKEOBJDIR)
44 .if defined(notMAKEOBJDIRPREFIX)
45 o2=${MAKEOBJDIRPREFIX}${__curdir}
46 .else
47 o2= ${MAKEOBJDIR}
48 .endif
49 .endif
50 o2= o
51 .endif
53 PRIMES=2 3 5 7 11
54 NUMBERS=1 2 3 4 5
56 n=2
57 .if ${PRIMES:M$n} == ""
58 X=not
59 .else
61 .endif
63 .if ${MACHINE_ARCH} == no-such
64 A=one
65 .else
66 .if ${MACHINE_ARCH} == not-this
67 .if ${MACHINE_ARCH} == something-else
68 A=unlikely
69 .else
70 A=no
71 .endif
72 .endif
73 A=other
74 # We expect an extra else warning - we're not skipping here
75 .else
76 A=this should be an error
77 .endif
79 .if $X != ""
80 .if $X == not
81 B=one
82 .else
83 B=other
84 # We expect an extra else warning - we are skipping here
85 .else
86 B=this should be an error
87 .endif
88 .else
89 B=unknown
90 .endif
92 .if "quoted" == quoted
93 C=clever
94 .else
95 C=dim
96 .endif
98 all:
99 @echo "$n is $X prime"
100 @echo "A='$A' B='$B' C='$C' o='$o,${o2}'"
101 @echo "Passed:${.newline} ${Ok:S/,/${.newline}/}"
102 @echo "${NUMBERS:@n@$n is ${("${PRIMES:M$n}" == ""):?not:} prime${.newline}@}"