blob: 74b4d270e2d9f050200380ecc5baa101029eed61 (
plain)
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
|
# TODO(c): fix test6 - \t$${empty} should be empty.
MAKEVER:=$(shell make --version | ruby -n0e 'puts $$_[/Make (\d)/,1]')
ifeq ($(MAKEVER),4)
AT=@
endif
# http://www.gnu.org/software/make/manual/make.html#Splitting-Recipe-Lines
test1:
$(AT) echo no\
space
$(AT) # echo no\
# space
$(AT) echo one \
space
$(AT) echo one\
space
test2:
$(AT) for d in foo bar; do \
echo $$d ; done
define cmd3
echo foo
echo bar
endef
test3:
$(cmd3)
define cmd4
echo foo ; \
echo bar
endef
test4:
$(cmd4)
test5:
$(AT) echo foo \
$$empty bar
test6:
echo foo\
$${empty}bar
define cmd7
@echo first
@echo second
endef
test7:
$(cmd7) \
third
|