Module Name: src
Committed By: rillig
Date: Sat Aug 22 12:30:57 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: depsrc-use.exp depsrc-use.mk
Log Message:
make(1): add test for correct command order in .USE sources
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/depsrc-use.exp
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/depsrc-use.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/depsrc-use.exp
diff -u src/usr.bin/make/unit-tests/depsrc-use.exp:1.2 src/usr.bin/make/unit-tests/depsrc-use.exp:1.3
--- src/usr.bin/make/unit-tests/depsrc-use.exp:1.2 Sat Aug 22 07:49:44 2020
+++ src/usr.bin/make/unit-tests/depsrc-use.exp Sat Aug 22 12:30:57 2020
@@ -1,4 +1,6 @@
-first
-second
+first 1
+first 2
+second 1
+second 2
directly
exit status 0
Index: src/usr.bin/make/unit-tests/depsrc-use.mk
diff -u src/usr.bin/make/unit-tests/depsrc-use.mk:1.3 src/usr.bin/make/unit-tests/depsrc-use.mk:1.4
--- src/usr.bin/make/unit-tests/depsrc-use.mk:1.3 Sat Aug 22 07:49:44 2020
+++ src/usr.bin/make/unit-tests/depsrc-use.mk Sat Aug 22 12:30:57 2020
@@ -1,4 +1,4 @@
-# $NetBSD: depsrc-use.mk,v 1.3 2020/08/22 07:49:44 rillig Exp $
+# $NetBSD: depsrc-use.mk,v 1.4 2020/08/22 12:30:57 rillig Exp $
#
# Tests for the special source .USE in dependency declarations,
# which allows to append common commands to other targets.
@@ -6,10 +6,12 @@
all: action directly
first: .USE
- @echo first # Using ${.TARGET} here would expand to "action"
+ @echo first 1 # Using ${.TARGET} here would expand to "action"
+ @echo first 2
second: .USE
- @echo second
+ @echo second 1
+ @echo second 2
# It's possible but uncommon to have a .USE target with no commands.
# This may happen as the result of expanding a .for loop.