aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/dir.mk
blob: f5926375312e05dce7af1591f61d772083849baa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# $NetBSD: dir.mk,v 1.4 2020/07/31 20:16:21 rillig Exp $
#
# Tests for dir.c.

# Dependency lines may use braces for expansion.
all: {one,two,three}

one:
	@echo 1
two:
	@echo 2
three:
	@echo 3

# The braces may start in the middle of a word.
all: f{our,ive}

four:
	@echo 4
five:
	@echo 5
six:
	@echo 6

# But nested braces don't work.
all: {{thi,fou}r,fif}teen

thirteen:
	@echo 13
fourteen:
	@echo 14
fifteen:
	@echo 15

# There may be multiple brace groups side by side.
all: {pre-,}{patch,configure}

pre-patch patch pre-configure configure:
	@echo $@

# Empty pieces are allowed in the braces.
all: {fetch,extract}{,-post}

fetch fetch-post extract extract-post:
	@echo $@

# The expansions may have duplicates.
# These are merged together because of the dependency line.
all: dup-{1,1,1,1,1,1,1}

dup-1:
	@echo $@

# Other than in Bash, the braces are also expanded if there is no comma.
all: {{{{{{{{{{single-word}}}}}}}}}}

single-word:
	@echo $@