]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - unit-tests/dir.mk
Import bmake-20200902
[FreeBSD/FreeBSD.git] / unit-tests / dir.mk
1 # $NetBSD: dir.mk,v 1.4 2020/07/31 20:16:21 rillig Exp $
2 #
3 # Tests for dir.c.
4
5 # Dependency lines may use braces for expansion.
6 all: {one,two,three}
7
8 one:
9         @echo 1
10 two:
11         @echo 2
12 three:
13         @echo 3
14
15 # The braces may start in the middle of a word.
16 all: f{our,ive}
17
18 four:
19         @echo 4
20 five:
21         @echo 5
22 six:
23         @echo 6
24
25 # But nested braces don't work.
26 all: {{thi,fou}r,fif}teen
27
28 thirteen:
29         @echo 13
30 fourteen:
31         @echo 14
32 fifteen:
33         @echo 15
34
35 # There may be multiple brace groups side by side.
36 all: {pre-,}{patch,configure}
37
38 pre-patch patch pre-configure configure:
39         @echo $@
40
41 # Empty pieces are allowed in the braces.
42 all: {fetch,extract}{,-post}
43
44 fetch fetch-post extract extract-post:
45         @echo $@
46
47 # The expansions may have duplicates.
48 # These are merged together because of the dependency line.
49 all: dup-{1,1,1,1,1,1,1}
50
51 dup-1:
52         @echo $@
53
54 # Other than in Bash, the braces are also expanded if there is no comma.
55 all: {{{{{{{{{{single-word}}}}}}}}}}
56
57 single-word:
58         @echo $@