summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-11-29 16:26:59 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-11-29 16:26:59 +0000
commit2afbcc28488962e27265d18b106b5d114adc06fb (patch)
treecbfc61d1ed5cbc9f024df1c3390e7ddcfe9940c7 /regress
parent55df41b563d595673e105141cf8ac1ab1c382847 (diff)
checking lazy evaluation of recursive variables
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/make/Makefile12
-rw-r--r--regress/usr.bin/make/mk2210
-rw-r--r--regress/usr.bin/make/t22.out2
-rw-r--r--regress/usr.bin/make/t23.out1
4 files changed, 22 insertions, 3 deletions
diff --git a/regress/usr.bin/make/Makefile b/regress/usr.bin/make/Makefile
index 407c8dcf552..f8d776b6a0b 100644
--- a/regress/usr.bin/make/Makefile
+++ b/regress/usr.bin/make/Makefile
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile,v 1.21 2004/11/21 12:58:12 espie Exp $
+# $OpenBSD: Makefile,v 1.22 2004/11/29 16:26:58 espie Exp $
# We don't pass t7, t13, t14, t17, t19, t20 t21
# and t16 yields piss poor performance
-REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21
+REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23
MALLOC_OPTIONS?=AZJ
t1: t1.out
@@ -91,13 +91,19 @@ t20:
t21:
cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk21 | diff - t21.out
+t22:
+ cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk22 b | diff - t22.out
+
+t23:
+ cd ${.CURDIR} && ulimit -t 60 && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk22 a 2>&1| diff - t23.out
+
z.a:
touch $@
t1.out:
echo MACHINE_ARCH=${MACHINE_ARCH} >$@
-.PHONY: t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 regress
+.PHONY: t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 regress
CLEANFILES+=t1.out z.a a.a a.b goodfile phony t15file
diff --git a/regress/usr.bin/make/mk22 b/regress/usr.bin/make/mk22
new file mode 100644
index 00000000000..f3dbde759b4
--- /dev/null
+++ b/regress/usr.bin/make/mk22
@@ -0,0 +1,10 @@
+# Recursion on variables.
+A=$B
+B=$C
+C=$A
+
+a:
+ echo $A
+
+b:
+ echo "business as usual"
diff --git a/regress/usr.bin/make/t22.out b/regress/usr.bin/make/t22.out
new file mode 100644
index 00000000000..d8e906f80a4
--- /dev/null
+++ b/regress/usr.bin/make/t22.out
@@ -0,0 +1,2 @@
+echo "business as usual"
+business as usual
diff --git a/regress/usr.bin/make/t23.out b/regress/usr.bin/make/t23.out
new file mode 100644
index 00000000000..ef6b478fdf9
--- /dev/null
+++ b/regress/usr.bin/make/t23.out
@@ -0,0 +1 @@
+Variable A is recursive.