summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2000-12-31 16:44:14 +0000
committerespie <espie@openbsd.org>2000-12-31 16:44:14 +0000
commita3ee128f6a5202d8e3f776f02bd0df6df82d078f (patch)
tree159914e4095d410c95e4d9d9c2057c51b09fc5b1
parentmerge mistake. -m is not available in *bsd-current (diff)
downloadwireguard-openbsd-a3ee128f6a5202d8e3f776f02bd0df6df82d078f.tar.xz
wireguard-openbsd-a3ee128f6a5202d8e3f776f02bd0df6df82d078f.zip
Some tests for SysV extended local variables ${@D} and the likes.
-rw-r--r--regress/usr.bin/make/Makefile15
-rw-r--r--regress/usr.bin/make/mk1020
-rw-r--r--regress/usr.bin/make/t10.out4
3 files changed, 35 insertions, 4 deletions
diff --git a/regress/usr.bin/make/Makefile b/regress/usr.bin/make/Makefile
index 493b0a19ce6..48d3687bcf1 100644
--- a/regress/usr.bin/make/Makefile
+++ b/regress/usr.bin/make/Makefile
@@ -1,9 +1,9 @@
-# $OpenBSD: Makefile,v 1.5 2000/11/24 14:52:25 espie Exp $
+# $OpenBSD: Makefile,v 1.6 2000/12/31 16:44:14 espie Exp $
NOMAN=
NOPROG=
-regress: t1 t2 t3 t4 t5 t6 t7 t8 t9
+regress: t1 t2 t3 t4 t5 t6 t7 t8 t9 t10
MALLOC_OPTIONS?=AZJ
t1: t1.out
@@ -48,12 +48,19 @@ t8:
t9:
cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk9 2>&1 | diff - t9.out
+
+# verify that systemV extended variables work as expected
+t10: z.a
+ cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk10 |diff - t10.out
+z.a:
+ touch $@
+
t1.out:
echo MACHINE_ARCH=${MACHINE_ARCH} >$@
-.PHONY: t1 t2 t3 t4 t5 t6 t7 t8 t9 regress
+.PHONY: t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 regress
-CLEANFILES+=t1.out
+CLEANFILES+=t1.out z.a
.include <bsd.prog.mk>
diff --git a/regress/usr.bin/make/mk10 b/regress/usr.bin/make/mk10
new file mode 100644
index 00000000000..a6078ed65ad
--- /dev/null
+++ b/regress/usr.bin/make/mk10
@@ -0,0 +1,20 @@
+# $OpenBSD: mk10,v 1.1 2000/12/31 16:44:14 espie Exp $
+
+all: a b/o/d.e z.b
+
+a:
+# Regression test: this will parse as a recursive variable which
+# does not exist, but should not be interpreted as a dynamic variable
+ # ${@D) abcd ${@F}
+# And this is the real one
+ # ${@D} ${@F}
+
+b/o/d.e:
+ # ${@D} ${@F}
+
+.SUFFIXES: .a .b
+
+.a.b:
+ # ${*D} ${*F}
+
+.PHONY: a b/o/d.e
diff --git a/regress/usr.bin/make/t10.out b/regress/usr.bin/make/t10.out
new file mode 100644
index 00000000000..fac80afe774
--- /dev/null
+++ b/regress/usr.bin/make/t10.out
@@ -0,0 +1,4 @@
+#
+# . a
+# b/o d.e
+# . z