Module Name: src
Committed By: rillig
Date: Thu Nov 5 18:08:39 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: var-class-local.exp var-class-local.mk
Log Message:
make(1): add test for legacy local variables @F, @D
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/var-class-local.exp
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/var-class-local.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/unit-tests/var-class-local.exp
diff -u src/usr.bin/make/unit-tests/var-class-local.exp:1.2 src/usr.bin/make/unit-tests/var-class-local.exp:1.3
--- src/usr.bin/make/unit-tests/var-class-local.exp:1.2 Sun Oct 25 09:46:25 2020
+++ src/usr.bin/make/unit-tests/var-class-local.exp Thu Nov 5 18:08:39 2020
@@ -1,2 +1,5 @@
+: Making var-class-local.c out of nothing.
+: Making var-class-local.o from var-class-local.c.
+: Making basename "var-class-local.o" in "." from "var-class-local.c" in ".".
: all overwritten
exit status 0
Index: src/usr.bin/make/unit-tests/var-class-local.mk
diff -u src/usr.bin/make/unit-tests/var-class-local.mk:1.4 src/usr.bin/make/unit-tests/var-class-local.mk:1.5
--- src/usr.bin/make/unit-tests/var-class-local.mk:1.4 Sun Oct 25 09:46:25 2020
+++ src/usr.bin/make/unit-tests/var-class-local.mk Thu Nov 5 18:08:39 2020
@@ -1,4 +1,4 @@
-# $NetBSD: var-class-local.mk,v 1.4 2020/10/25 09:46:25 rillig Exp $
+# $NetBSD: var-class-local.mk,v 1.5 2020/11/05 18:08:39 rillig Exp $
#
# Tests for target-local variables, such as ${.TARGET} or $@.
@@ -25,6 +25,20 @@
.endif
all:
+
+.SUFFIXES: .c .o
+
+var-class-local.c:
+ : Making ${.TARGET} out of nothing.
+
+.c.o:
+ : Making ${.TARGET} from ${.IMPSRC}.
+
+ # The local variables @F, @D, <F, <D are legacy forms.
+ # See the manual page for details.
+ : Making basename "${@F}" in "${@D}" from "${<F}" in "${<D}".
+
+all: var-class-local.o
# The ::= modifier overwrites the .TARGET variable in the node
# 'all', not in the global scope. This can be seen with the -dv
# option, looking for "all:@ = overwritten".