11be35a165
To do so, a few dependencies have been imported: * external/bsd/lutok * external/mit/lua * external/public-domain/sqlite * external/public-domain/xz The Kyua framework is the new generation of ATF (Automated Test Framework), it is composed of: * external/bsd/atf * external/bsd/kyua-atf-compat * external/bsd/kyua-cli * external/bsd/kyua-tester * tests Kyua/ATF being written in C++, it depends on libstdc++ which is provided by GCC. As this is not part of the sources, Kyua is only compiled when the native GCC utils are installed. To install Kyua do the following: * In a cross-build enviromnent, add the following to the build.sh commandline: -V MKBINUTILS=yes -V MKGCCCMDS=yes WARNING: At this point the import is still experimental, and not supported on native builds (a.k.a make build). Change-Id: I26aee23c5bbd2d64adcb7c1beb98fe0d479d7ada
102 lines
1.7 KiB
Makefile
102 lines
1.7 KiB
Makefile
# $NetBSD: d_cond1.mk,v 1.1 2012/03/17 16:33:14 jruoho Exp $
|
|
|
|
# hard code these!
|
|
TEST_UNAME_S= NetBSD
|
|
TEST_UNAME_M= sparc
|
|
TEST_MACHINE= i386
|
|
|
|
.if ${TEST_UNAME_S}
|
|
Ok=var,
|
|
.endif
|
|
.if ("${TEST_UNAME_S}")
|
|
Ok+=(\"var\"),
|
|
.endif
|
|
.if (${TEST_UNAME_M} != ${TEST_MACHINE})
|
|
Ok+=(var != var),
|
|
.endif
|
|
.if ${TEST_UNAME_M} != ${TEST_MACHINE}
|
|
Ok+= var != var,
|
|
.endif
|
|
.if !((${TEST_UNAME_M} != ${TEST_MACHINE}) && defined(X))
|
|
Ok+= !((var != var) && defined(name)),
|
|
.endif
|
|
# from bsd.obj.mk
|
|
MKOBJ?=no
|
|
.if ${MKOBJ} == "no"
|
|
o= no
|
|
Ok+= var == "quoted",
|
|
.else
|
|
.if defined(notMAKEOBJDIRPREFIX) || defined(norMAKEOBJDIR)
|
|
.if defined(notMAKEOBJDIRPREFIX)
|
|
o=${MAKEOBJDIRPREFIX}${__curdir}
|
|
.else
|
|
o= ${MAKEOBJDIR}
|
|
.endif
|
|
.endif
|
|
o= o
|
|
.endif
|
|
|
|
# repeat the above to check we get the same result
|
|
.if ${MKOBJ} == "no"
|
|
o2= no
|
|
.else
|
|
.if defined(notMAKEOBJDIRPREFIX) || defined(norMAKEOBJDIR)
|
|
.if defined(notMAKEOBJDIRPREFIX)
|
|
o2=${MAKEOBJDIRPREFIX}${__curdir}
|
|
.else
|
|
o2= ${MAKEOBJDIR}
|
|
.endif
|
|
.endif
|
|
o2= o
|
|
.endif
|
|
|
|
PRIMES=2 3 5 7 11
|
|
NUMBERS=1 2 3 4 5
|
|
|
|
n=2
|
|
.if ${PRIMES:M$n} == ""
|
|
X=not
|
|
.else
|
|
X=
|
|
.endif
|
|
|
|
.if ${MACHINE_ARCH} == no-such
|
|
A=one
|
|
.else
|
|
.if ${MACHINE_ARCH} == not-this
|
|
.if ${MACHINE_ARCH} == something-else
|
|
A=unlikely
|
|
.else
|
|
A=no
|
|
.endif
|
|
.endif
|
|
A=other
|
|
# We expect an extra else warning - we're not skipping here
|
|
.else
|
|
A=this should be an error
|
|
.endif
|
|
|
|
.if $X != ""
|
|
.if $X == not
|
|
B=one
|
|
.else
|
|
B=other
|
|
# We expect an extra else warning - we are skipping here
|
|
.else
|
|
B=this should be an error
|
|
.endif
|
|
.else
|
|
B=unknown
|
|
.endif
|
|
|
|
.if "quoted" == quoted
|
|
C=clever
|
|
.else
|
|
C=dim
|
|
.endif
|
|
|
|
all:
|
|
@echo "$n is $X prime"
|
|
@echo "A='$A' B='$B' C='$C' o='$o,${o2}'"
|
|
@echo "Passed:${.newline} ${Ok:S/,/${.newline}/}"
|
|
@echo "${NUMBERS:@n@$n is ${("${PRIMES:M$n}" == ""):?not:} prime${.newline}@}"
|