| @@ -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. |
7 | all: {one,two,three} | | 7 | all: {one,two,three} |
8 | | | 8 | |
9 | one: | | 9 | one: |
10 | @echo 1 | | 10 | : 1 |
11 | two: | | 11 | two: |
12 | @echo 2 | | 12 | : 2 |
13 | three: | | 13 | three: |
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. |
17 | all: f{our,ive} | | 17 | all: f{our,ive} |
18 | | | 18 | |
19 | four: | | 19 | four: |
20 | @echo 4 | | 20 | : 4 |
21 | five: | | 21 | five: |
22 | @echo 5 | | 22 | : 5 |
23 | six: | | 23 | six: |
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. |
28 | all: {{thi,fou}r,fif}teen | | 28 | all: {{thi,fou}r,fif}teen |
29 | | | 29 | |
30 | thirteen: | | 30 | thirteen: |
31 | @echo 13 | | 31 | : 13 |
32 | fourteen: | | 32 | fourteen: |
33 | @echo 14 | | 33 | : 14 |
34 | fifteen: | | 34 | fifteen: |
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. |
38 | all: {pre-,}{patch,configure} | | 38 | all: {pre-,}{patch,configure} |
39 | | | 39 | |
40 | pre-patch patch pre-configure configure: | | 40 | pre-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. |
44 | all: {fetch,extract}{,-post} | | 44 | all: {fetch,extract}{,-post} |
45 | | | 45 | |
46 | fetch fetch-post extract extract-post: | | 46 | fetch 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. |
51 | all: dup-{1,1,1,1,1,1,1} | | 51 | all: dup-{1,1,1,1,1,1,1} |
52 | | | 52 | |
53 | dup-1: | | 53 | dup-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. |
57 | all: {{{{{{{{{{single-word}}}}}}}}}} | | 57 | all: {{{{{{{{{{single-word}}}}}}}}}} |
58 | | | 58 | |
59 | single-word: | | 59 | single-word: |
60 | @echo $@ | | 60 | : $@ |