xref: /openbsd/regress/usr.bin/make/Makefile (revision ad977213)
1*ad977213Sespie# $OpenBSD: Makefile,v 1.15 2002/02/26 16:54:47 espie Exp $
2d30492b3Sespie
3fcb573ceSespie# We don't pass t7, t13, t14...
4*ad977213SespieREGRESSTARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15
5d30492b3Sespie
6fe973566SespieMALLOC_OPTIONS?=AZJ
7d30492b3Sespiet1: t1.out
8fe973566Sespie	env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -e -r -f ${.CURDIR}/mk1 | diff - t1.out
9d30492b3Sespie
10d30492b3Sespie
11d30492b3Sespie# This is a POSIX test. pmake does not pass variables to submakes until
12d30492b3Sespie# after OpenBSD 2.7.
13d30492b3Sespiet2:
14fe973566Sespie	cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk2| diff - t2.out
15d30492b3Sespie
16d30492b3Sespiet3:
17fe973566Sespie	cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk3 -f mk3a|diff - t3.out
18fe973566Sespie	cd ${.CURDIR} && cat mk3a |env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk3 -f -|diff - t3.out
19fe973566Sespie	cd ${.CURDIR} && cat mk3 |env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f - -f mk3a|diff - t3.out
20fe973566Sespie	cd ${.CURDIR} && cat mk3 mk3a|env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f - |diff - t3.out
21d30492b3Sespie
22d30492b3Sespiet4:
23fe973566Sespie	cd ${.CURDIR} && cat mk4 mk4a|env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f - |diff - t4.out
24d30492b3Sespie	# Splitting files along conditionals should not work
25fe973566Sespie	if cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk4 -f mk4a 2>/dev/null; then false; fi
26d30492b3Sespie
27d30492b3Sespie# Another POSIX test, checking that MAKEFLAGS does work
28d30492b3Sespiet5:
29d30492b3Sespie	# first check that make does fail as expected
30fe973566Sespie	if cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mkfail 2>/dev/null; then false; fi
31d30492b3Sespie	# first form of MAKEFLAGS
32fe973566Sespie	cd ${.CURDIR} && env -i PATH=${PATH} MAKEFLAGS=-n MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mkfail
33d30492b3Sespie	# second form of MAKEFLAGS
34fe973566Sespie	cd ${.CURDIR} && env -i PATH=${PATH} MAKEFLAGS=n MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mkfail
35d30492b3Sespie
36d30492b3Sespiet6:
37fe973566Sespie	cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} A=good -r -f mk6 | diff - t6.out
38d30492b3Sespie
39300b6ef0Sespie# This test currently fails, and will until the cond parser is rewritten.
401a5be1c1Sespiet7:
41fe973566Sespie	if cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk7 2>/dev/null; then false; fi
421a5be1c1Sespie
439e90d608Sespie# check for existent/non existent files
449e90d608Sespiet8:
459e90d608Sespie	touch goodfile phony
46fe973566Sespie	cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk8 | diff - t8.out
479e90d608Sespie
483a482e43Sespiet9:
49fe973566Sespie	cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk9 2>&1 | diff - t9.out
503a482e43Sespie
51a3ee128fSespie# verify that systemV extended variables work as expected
52a3ee128fSespiet10:	z.a
53a3ee128fSespie	cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk10 |diff - t10.out
54a3ee128fSespie
55da5327dbSespie# check for substitution parser in some confusing situations
56da5327dbSespiet11:
57da5327dbSespie	cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk11 |diff - t11.out
58da5327dbSespie	cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk11 A=t|diff - t11.out2
59da5327dbSespie
6000a5c933Sespie# Check for filename expansions.
6100a5c933Sespiet12:
6200a5c933Sespie	cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk12 |diff - t12.out
6300a5c933Sespie
64ea40f178Sespie# Verify whitespace handling. Currently failing.
65ea40f178Sespiet13:
66ea40f178Sespie	cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk13 |diff - t13.out
67ea40f178Sespie
68fcb573ceSespiet14:
69fcb573ceSespie	if cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk14 2>/dev/null; then false; fi
70fcb573ceSespie
71*ad977213Sespiet15:
72*ad977213Sespie	touch t15file
73*ad977213Sespie	cd ${.CURDIR} && ulimit -t 2 && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk15 2>/dev/null
74*ad977213Sespie
75a3ee128fSespiez.a:
76a3ee128fSespie	touch $@
77a3ee128fSespie
78d30492b3Sespiet1.out:
79d30492b3Sespie	echo MACHINE_ARCH=${MACHINE_ARCH} >$@
80d30492b3Sespie
81*ad977213Sespie.PHONY: t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 regress
82d30492b3Sespie
83*ad977213SespieCLEANFILES+=t1.out z.a a.a a.b goodfile phony t15file
84d30492b3Sespie
858267faadSart.include <bsd.regress.mk>
86