dir.mk revision 1.6 1 # $NetBSD: dir.mk,v 1.6 2020/10/31 21:12:36 rillig Exp $
2 #
3 # Tests for dir.c.
4
5 # Dependency lines may use braces for expansion.
6 # See DirExpandCurly for the implementation.
7 all: {one,two,three}
8
9 one:
10 : 1
11 two:
12 : 2
13 three:
14 : 3
15
16 # The braces may start in the middle of a word.
17 all: f{our,ive}
18
19 four:
20 : 4
21 five:
22 : 5
23 six:
24 : 6
25
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.
28 all: {{thi,fou}r,fif}teen
29
30 thirteen:
31 : 13
32 fourteen:
33 : 14
34 fifteen:
35 : 15
36
37 # There may be multiple brace groups side by side.
38 all: {pre-,}{patch,configure}
39
40 pre-patch patch pre-configure configure:
41 : $@
42
43 # Empty pieces are allowed in the braces.
44 all: {fetch,extract}{,-post}
45
46 fetch fetch-post extract extract-post:
47 : $@
48
49 # The expansions may have duplicates.
50 # These are merged together because of the dependency line.
51 all: dup-{1,1,1,1,1,1,1}
52
53 dup-1:
54 : $@
55
56 # Other than in Bash, the braces are also expanded if there is no comma.
57 all: {{{{{{{{{{single-word}}}}}}}}}}
58
59 single-word:
60 : $@
61