No empty .Rs/.Re
[netbsd-mini2440.git] / tests / util / make / d_varcmd.mk
blob7b7bb2c156626be08d8071c4738bd771c66a7848
1 # $NetBSD$
3 # Test behaviour of recursive make and vars set on command line.
5 FU=fu
6 FOO?=foo
7 .if !empty(.TARGETS)
8 TAG=${.TARGETS}
9 .endif
10 TAG?=default
12 all: one
14 show:
15 @echo "${TAG} FU=<v>${FU}</v> FOO=<v>${FOO}</v> VAR=<v>${VAR}</v>"
17 one: show
18 @${.MAKE} -f ${MAKEFILE} FU=bar FOO=goo two
20 two: show
21 @${.MAKE} -f ${MAKEFILE} three
23 three: show
24 @${.MAKE} -f ${MAKEFILE} four
27 .ifmake four
28 VAR=Internal
29 .MAKEOVERRIDES+= VAR
30 .endif
32 four: show
33 @${.MAKE} -f ${MAKEFILE} five
35 M = x
36 V.y = is y
37 V.x = is x
38 V := ${V.$M}
39 K := ${V}
41 show-v:
42 @echo '${TAG} v=${V} k=${K}'
44 five: show show-v
45 @${.MAKE} -f ${MAKEFILE} M=y six
47 six: show-v
48 @${.MAKE} -f ${MAKEFILE} V=override show-v