summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-05-05 19:02:30 +0000
committerjmallett <jmallett@FreeBSD.org>2002-05-05 19:02:30 +0000
commit62cedbf5fcf1db5d9c9b44842e4d98a9e8929b2b (patch)
treeea93a0dfe7f1f5ea71ebfde73c16da13504b398e /tools
parent087f3b7f313155e4d70fa73612e3e0fe7bd501b5 (diff)
downloadFreeBSD-src-62cedbf5fcf1db5d9c9b44842e4d98a9e8929b2b.zip
FreeBSD-src-62cedbf5fcf1db5d9c9b44842e4d98a9e8929b2b.tar.gz
Add a regression test for bin/5297, regarding sysv substitution with a nil
left-hand-side.
Diffstat (limited to 'tools')
-rw-r--r--tools/build/make_check/Makefile9
-rw-r--r--tools/build/make_check/regress.sysvmatch.out1
-rw-r--r--tools/regression/usr.bin/make/Makefile9
-rw-r--r--tools/regression/usr.bin/make/regress.sysvmatch.out1
4 files changed, 20 insertions, 0 deletions
diff --git a/tools/build/make_check/Makefile b/tools/build/make_check/Makefile
index 2176dae..14708b3 100644
--- a/tools/build/make_check/Makefile
+++ b/tools/build/make_check/Makefile
@@ -8,6 +8,7 @@ DATA2?= allo
DATA5:= ${DATA2:S/ll/ii/g} ${DATA1:S/ll/rr/g}
DATA2= yello
DATA1:= ${DATA5:S/l/r/g}
+NIL=
all:
@echo "Running test variables"
@@ -17,6 +18,9 @@ all:
@echo "Running test targets"
@${MAKE} double || ${MAKE} failure
@echo "PASS: Test targets detected no regression."
+ @echo "Running test sysvmatch"
+ @${MAKE} sysvmatch || ${MAKE} failure
+ @echo "PASS: Test sysvmatch detected no regression."
# Doubly-defined targets. NetBSD make(1) will warn, ours will silently use the
# ``right'' one.
@@ -26,6 +30,11 @@ double:
double:
@false
+# Some versions of FreeBSD make(1) do not handle a nil LHS in sysvsubst.
+sysvmatch:
+ @echo EMPTY ${NIL:=foo} LHS | \
+ diff -u ${.CURDIR}/regress.sysvmatch.out - || false
+
failure:
@echo "FAIL: Test failed: regression detected. See above."
@false
diff --git a/tools/build/make_check/regress.sysvmatch.out b/tools/build/make_check/regress.sysvmatch.out
new file mode 100644
index 0000000..759859e
--- /dev/null
+++ b/tools/build/make_check/regress.sysvmatch.out
@@ -0,0 +1 @@
+EMPTY LHS
diff --git a/tools/regression/usr.bin/make/Makefile b/tools/regression/usr.bin/make/Makefile
index 2176dae..14708b3 100644
--- a/tools/regression/usr.bin/make/Makefile
+++ b/tools/regression/usr.bin/make/Makefile
@@ -8,6 +8,7 @@ DATA2?= allo
DATA5:= ${DATA2:S/ll/ii/g} ${DATA1:S/ll/rr/g}
DATA2= yello
DATA1:= ${DATA5:S/l/r/g}
+NIL=
all:
@echo "Running test variables"
@@ -17,6 +18,9 @@ all:
@echo "Running test targets"
@${MAKE} double || ${MAKE} failure
@echo "PASS: Test targets detected no regression."
+ @echo "Running test sysvmatch"
+ @${MAKE} sysvmatch || ${MAKE} failure
+ @echo "PASS: Test sysvmatch detected no regression."
# Doubly-defined targets. NetBSD make(1) will warn, ours will silently use the
# ``right'' one.
@@ -26,6 +30,11 @@ double:
double:
@false
+# Some versions of FreeBSD make(1) do not handle a nil LHS in sysvsubst.
+sysvmatch:
+ @echo EMPTY ${NIL:=foo} LHS | \
+ diff -u ${.CURDIR}/regress.sysvmatch.out - || false
+
failure:
@echo "FAIL: Test failed: regression detected. See above."
@false
diff --git a/tools/regression/usr.bin/make/regress.sysvmatch.out b/tools/regression/usr.bin/make/regress.sysvmatch.out
new file mode 100644
index 0000000..759859e
--- /dev/null
+++ b/tools/regression/usr.bin/make/regress.sysvmatch.out
@@ -0,0 +1 @@
+EMPTY LHS
OpenPOWER on IntegriCloud