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 more tests for expandin...



details:   https://anonhg.NetBSD.org/src/rev/a080c784e92a
branches:  trunk
changeset: 974428:a080c784e92a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jul 31 20:08:08 2020 +0000

description:
make(1): add more tests for expanding curly braces in dependencies

diffstat:

 usr.bin/make/unit-tests/dir.exp |   5 +++++
 usr.bin/make/unit-tests/dir.mk  |  16 +++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletions(-)

diffs (44 lines):

diff -r 56cd066b1e72 -r a080c784e92a usr.bin/make/unit-tests/dir.exp
--- a/usr.bin/make/unit-tests/dir.exp   Fri Jul 31 20:04:18 2020 +0000
+++ b/usr.bin/make/unit-tests/dir.exp   Fri Jul 31 20:08:08 2020 +0000
@@ -10,4 +10,9 @@
 pre-configure
 patch
 configure
+fetch
+fetch-post
+extract
+extract-post
+dup-1
 exit status 0
diff -r 56cd066b1e72 -r a080c784e92a usr.bin/make/unit-tests/dir.mk
--- a/usr.bin/make/unit-tests/dir.mk    Fri Jul 31 20:04:18 2020 +0000
+++ b/usr.bin/make/unit-tests/dir.mk    Fri Jul 31 20:08:08 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: dir.mk,v 1.2 2020/07/31 20:02:44 rillig Exp $
+# $NetBSD: dir.mk,v 1.3 2020/07/31 20:08:08 rillig Exp $
 #
 # Tests for dir.c.
 
@@ -32,7 +32,21 @@
 fifteen:
        @echo 15
 
+# There may be multiple brace groups side by side.
 all: {pre-,}{patch,configure}
 
 pre-patch patch pre-configure configure:
        @echo $@
+
+# Empty pieces are allowed in the braces.
+all: {fetch,extract}{,-post}
+
+fetch fetch-post extract extract-post:
+       @echo $@
+
+# The expansions may have duplicates.
+# These are merged together because of the dependency line.
+all: dup-{1,1,1,1,1,1,1}
+
+dup-1:
+       @echo $@



Home | Main Index | Thread Index | Old Index