summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2002-11-28 13:08:09 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2002-11-28 13:08:09 +0000
commit113cf9e649447590b70c59f103fd48a860e6c809 (patch)
treef8d79407c98a8e7dabbb3feef2f9111550ae7ba1 /tools
parent43b92fef626c219f759af893429c2b275993c19a (diff)
Notes
Diffstat (limited to 'tools')
-rw-r--r--tools/build/make_check/Makefile26
-rw-r--r--tools/regression/usr.bin/make/Makefile26
2 files changed, 50 insertions, 2 deletions
diff --git a/tools/build/make_check/Makefile b/tools/build/make_check/Makefile
index 57b0d8fc75d0..f4dec2efeda3 100644
--- a/tools/build/make_check/Makefile
+++ b/tools/build/make_check/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
# Test for broken LHS expansion.
-# This *must* case make(1) to detect a recursive variable, and fail as such.
+# This *must* cause make(1) to detect a recursive variable, and fail as such.
.if make(lhs_expn)
FOO= ${BAR}
BAR${NIL}= ${FOO}
@@ -32,6 +32,12 @@ all:
@echo "Running test lhs_expn"
@! ${MAKE} lhs_expn && true || ${MAKE} failure
@echo "PASS: Test lhs_expn detected no regression."
+ @echo "Running test notdef"
+ @${MAKE} notdef || ${MAKE} failure
+ @echo "PASS: Test notdef detected no regression."
+ @echo "Running test modifiers"
+ @${MAKE} modifiers || ${MAKE} failure
+ @echo "PASS: Test modifiers detected no regression."
.if make(double)
# Doubly-defined targets. make(1) will warn, but use the "right" one. If it
@@ -57,6 +63,24 @@ sysvmatch:
lhs_expn:
@true
+.if make(notdef)
+# make(1) claims to only evaluate a conditional as far as is necessary
+# to determine its value; that was not always the case.
+.undef notdef
+notdef:
+.if defined(notdef) && ${notdef:U}
+.endif
+.endif
+
+.if make(modifiers)
+# See if make(1) supports the C modifier.
+modifiers:
+ @if ${MAKE} -V .CURDIR:C/.// 2>&1 >/dev/null | \
+ grep -q "Unknown modifier 'C'"; then \
+ false; \
+ fi
+.endif
+
failure:
@echo "FAIL: Test failed: regression detected. See above."
@false
diff --git a/tools/regression/usr.bin/make/Makefile b/tools/regression/usr.bin/make/Makefile
index 57b0d8fc75d0..f4dec2efeda3 100644
--- a/tools/regression/usr.bin/make/Makefile
+++ b/tools/regression/usr.bin/make/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
# Test for broken LHS expansion.
-# This *must* case make(1) to detect a recursive variable, and fail as such.
+# This *must* cause make(1) to detect a recursive variable, and fail as such.
.if make(lhs_expn)
FOO= ${BAR}
BAR${NIL}= ${FOO}
@@ -32,6 +32,12 @@ all:
@echo "Running test lhs_expn"
@! ${MAKE} lhs_expn && true || ${MAKE} failure
@echo "PASS: Test lhs_expn detected no regression."
+ @echo "Running test notdef"
+ @${MAKE} notdef || ${MAKE} failure
+ @echo "PASS: Test notdef detected no regression."
+ @echo "Running test modifiers"
+ @${MAKE} modifiers || ${MAKE} failure
+ @echo "PASS: Test modifiers detected no regression."
.if make(double)
# Doubly-defined targets. make(1) will warn, but use the "right" one. If it
@@ -57,6 +63,24 @@ sysvmatch:
lhs_expn:
@true
+.if make(notdef)
+# make(1) claims to only evaluate a conditional as far as is necessary
+# to determine its value; that was not always the case.
+.undef notdef
+notdef:
+.if defined(notdef) && ${notdef:U}
+.endif
+.endif
+
+.if make(modifiers)
+# See if make(1) supports the C modifier.
+modifiers:
+ @if ${MAKE} -V .CURDIR:C/.// 2>&1 >/dev/null | \
+ grep -q "Unknown modifier 'C'"; then \
+ false; \
+ fi
+.endif
+
failure:
@echo "FAIL: Test failed: regression detected. See above."
@false