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): in archive test, use wildca...



details:   https://anonhg.NetBSD.org/src/rev/4b2e6763194c
branches:  trunk
changeset: 975227:4b2e6763194c
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Aug 23 17:51:24 2020 +0000

description:
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.

diffstat:

 usr.bin/make/unit-tests/archive.exp |  1 +
 usr.bin/make/unit-tests/archive.mk  |  6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 18da2be8fe03 -r 4b2e6763194c usr.bin/make/unit-tests/archive.exp
--- a/usr.bin/make/unit-tests/archive.exp       Sun Aug 23 17:50:19 2020 +0000
+++ b/usr.bin/make/unit-tests/archive.exp       Sun Aug 23 17:51:24 2020 +0000
@@ -6,6 +6,7 @@
 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
diff -r 18da2be8fe03 -r 4b2e6763194c usr.bin/make/unit-tests/archive.mk
--- a/usr.bin/make/unit-tests/archive.mk        Sun Aug 23 17:50:19 2020 +0000
+++ b/usr.bin/make/unit-tests/archive.mk        Sun Aug 23 17:51:24 2020 +0000
@@ -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 @@
 
 # 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)



Home | Main Index | Thread Index | Old Index