Module Name:    src
Committed By:   rillig
Date:           Sun Aug 23 17:51:24 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: archive.exp archive.mk

Log Message:
make(1): in archive test, use wildcard that matches more than 1 file

This is to make sure that the buffer used for "archive(member)" is
properly reset after each member.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/archive.exp
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/archive.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/archive.exp
diff -u src/usr.bin/make/unit-tests/archive.exp:1.3 src/usr.bin/make/unit-tests/archive.exp:1.4
--- src/usr.bin/make/unit-tests/archive.exp:1.3	Sun Aug 23 17:34:46 2020
+++ src/usr.bin/make/unit-tests/archive.exp	Sun Aug 23 17:51:24 2020
@@ -6,6 +6,7 @@ archive.mk
 modmisc.mk
 varmisc.mk
 list-archive-wildcard: archive.mk
+list-archive-wildcard: ternary.mk
 depend-on-existing-member
 `depend-on-nonexistent-member' is up to date.
 rm -f libprog.a

Index: src/usr.bin/make/unit-tests/archive.mk
diff -u src/usr.bin/make/unit-tests/archive.mk:1.4 src/usr.bin/make/unit-tests/archive.mk:1.5
--- src/usr.bin/make/unit-tests/archive.mk:1.4	Sun Aug 23 17:34:46 2020
+++ src/usr.bin/make/unit-tests/archive.mk	Sun Aug 23 17:51:24 2020
@@ -1,4 +1,4 @@
-# $NetBSD: archive.mk,v 1.4 2020/08/23 17:34:46 rillig Exp $
+# $NetBSD: archive.mk,v 1.5 2020/08/23 17:51:24 rillig Exp $
 #
 # Very basic demonstration of handling archives, based on the description
 # in PSD.doc/tutorial.ms.
@@ -31,8 +31,8 @@ list-archive: ${ARCHIVE}
 
 # XXX: I had expected that this dependency would select all *.mk files from
 # the archive.  Instead, the globbing is done in the current directory.
-# To prevent an overly long file list, the pattern is restricted to ar*.mk.
-list-archive-wildcard: ${ARCHIVE}(ar*.mk)
+# To prevent an overly long file list, the pattern is restricted to [at]*.mk.
+list-archive-wildcard: ${ARCHIVE}([at]*.mk)
 	${RUN} printf '%s\n' ${.ALLSRC:O:@member@${.TARGET:Q}': '${member:Q}@}
 
 depend-on-existing-member: ${ARCHIVE}(archive.mk)

Reply via email to