Sat Oct 31 21:12:36 2020 UTC ()
make(1): mark the output in test dir.mk with a prefix

This is needed to distinguish it from the debug log, which will be added
in the next commit.


(rillig)
diff -r1.5 -r1.6 src/usr.bin/make/unit-tests/dir.exp
diff -r1.5 -r1.6 src/usr.bin/make/unit-tests/dir.mk

cvs diff -r1.5 -r1.6 src/usr.bin/make/unit-tests/dir.exp (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/dir.exp 2020/07/31 20:16:21 1.5
+++ src/usr.bin/make/unit-tests/dir.exp 2020/10/31 21:12:36 1.6
@@ -1,19 +1,19 @@ @@ -1,19 +1,19 @@
11 1: 1
22 2: 2
33 3: 3
44 4: 4
55 5: 5
613 6: 13
714 7: 14
815 8: 15
9pre-patch 9: pre-patch
10pre-configure 10: pre-configure
11patch 11: patch
12configure 12: configure
13fetch 13: fetch
14fetch-post 14: fetch-post
15extract 15: extract
16extract-post 16: extract-post
17dup-1 17: dup-1
18single-word 18: single-word
19exit status 0 19exit status 0

cvs diff -r1.5 -r1.6 src/usr.bin/make/unit-tests/dir.mk (expand / switch to unified diff)

--- src/usr.bin/make/unit-tests/dir.mk 2020/09/07 19:48:08 1.5
+++ src/usr.bin/make/unit-tests/dir.mk 2020/10/31 21:12:36 1.6
@@ -1,60 +1,60 @@ @@ -1,60 +1,60 @@
1# $NetBSD: dir.mk,v 1.5 2020/09/07 19:48:08 rillig Exp $ 1# $NetBSD: dir.mk,v 1.6 2020/10/31 21:12:36 rillig Exp $
2# 2#
3# Tests for dir.c. 3# Tests for dir.c.
4 4
5# Dependency lines may use braces for expansion. 5# Dependency lines may use braces for expansion.
6# See DirExpandCurly for the implementation. 6# See DirExpandCurly for the implementation.
7all: {one,two,three} 7all: {one,two,three}
8 8
9one: 9one:
10 @echo 1 10 : 1
11two: 11two:
12 @echo 2 12 : 2
13three: 13three:
14 @echo 3 14 : 3
15 15
16# The braces may start in the middle of a word. 16# The braces may start in the middle of a word.
17all: f{our,ive} 17all: f{our,ive}
18 18
19four: 19four:
20 @echo 4 20 : 4
21five: 21five:
22 @echo 5 22 : 5
23six: 23six:
24 @echo 6 24 : 6
25 25
26# Nested braces work as expected since 2020-07-31 19:06 UTC. 26# Nested braces work as expected since 2020-07-31 19:06 UTC.
27# They had been broken at least since 2003-01-01, probably even longer. 27# They had been broken at least since 2003-01-01, probably even longer.
28all: {{thi,fou}r,fif}teen 28all: {{thi,fou}r,fif}teen
29 29
30thirteen: 30thirteen:
31 @echo 13 31 : 13
32fourteen: 32fourteen:
33 @echo 14 33 : 14
34fifteen: 34fifteen:
35 @echo 15 35 : 15
36 36
37# There may be multiple brace groups side by side. 37# There may be multiple brace groups side by side.
38all: {pre-,}{patch,configure} 38all: {pre-,}{patch,configure}
39 39
40pre-patch patch pre-configure configure: 40pre-patch patch pre-configure configure:
41 @echo $@ 41 : $@
42 42
43# Empty pieces are allowed in the braces. 43# Empty pieces are allowed in the braces.
44all: {fetch,extract}{,-post} 44all: {fetch,extract}{,-post}
45 45
46fetch fetch-post extract extract-post: 46fetch fetch-post extract extract-post:
47 @echo $@ 47 : $@
48 48
49# The expansions may have duplicates. 49# The expansions may have duplicates.
50# These are merged together because of the dependency line. 50# These are merged together because of the dependency line.
51all: dup-{1,1,1,1,1,1,1} 51all: dup-{1,1,1,1,1,1,1}
52 52
53dup-1: 53dup-1:
54 @echo $@ 54 : $@
55 55
56# Other than in Bash, the braces are also expanded if there is no comma. 56# Other than in Bash, the braces are also expanded if there is no comma.
57all: {{{{{{{{{{single-word}}}}}}}}}} 57all: {{{{{{{{{{single-word}}}}}}}}}}
58 58
59single-word: 59single-word:
60 @echo $@ 60 : $@