Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make/unit-tests make(1): add test for correct comman...



details:   https://anonhg.NetBSD.org/src/rev/b4366cf0391d
branches:  trunk
changeset: 937605:b4366cf0391d
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Aug 22 12:30:57 2020 +0000

description:
make(1): add test for correct command order in .USE sources

diffstat:

 usr.bin/make/unit-tests/depsrc-use.exp |  6 ++++--
 usr.bin/make/unit-tests/depsrc-use.mk  |  8 +++++---
 2 files changed, 9 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r 6514c3befe58 -r b4366cf0391d usr.bin/make/unit-tests/depsrc-use.exp
--- a/usr.bin/make/unit-tests/depsrc-use.exp    Sat Aug 22 11:57:18 2020 +0000
+++ b/usr.bin/make/unit-tests/depsrc-use.exp    Sat Aug 22 12:30:57 2020 +0000
@@ -1,4 +1,6 @@
-first
-second
+first 1
+first 2
+second 1
+second 2
 directly
 exit status 0
diff -r 6514c3befe58 -r b4366cf0391d usr.bin/make/unit-tests/depsrc-use.mk
--- a/usr.bin/make/unit-tests/depsrc-use.mk     Sat Aug 22 11:57:18 2020 +0000
+++ b/usr.bin/make/unit-tests/depsrc-use.mk     Sat Aug 22 12:30:57 2020 +0000
@@ -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.



Home | Main Index | Thread Index | Old Index