No empty .Rs/.Re
[netbsd-mini2440.git] / tests / util / make / d_modmisc.mk
blob9c5e94361986694844e6fa862f8ee580980dc5f4
1 # $NetBSD$
3 # miscellaneous modifier tests
5 path=:/bin:/usr/bin::/sbin:/usr/sbin:.:/home/user/bin:.
6 # strip cwd from path.
7 MOD_NODOT=S/:/ /g:N.:ts:
8 # and decorate, note that $'s need to be doubled. Also note that
9 # the modifier_variable can be used with other modifiers.
10 MOD_NODOTX=S/:/ /g:N.:@d@'$$d'@
11 # another mod - pretend it is more interesting
12 MOD_HOMES=S,/home/,/homes/,
13 MOD_OPT=@d@$${exists($$d):?$$d:$${d:S,/usr,/opt,}}@
14 MOD_SEP=S,:, ,g
16 all: modvar modvarloop
18 modvar:
19 @echo "path='${path}'"
20 @echo "path='${path:${MOD_NODOT}}'"
21 @echo "path='${path:S,home,homes,:${MOD_NODOT}}'"
22 @echo "path=${path:${MOD_NODOTX}:ts:}"
23 @echo "path=${path:${MOD_HOMES}:${MOD_NODOTX}:ts:}"
25 .for d in ${path:${MOD_SEP}:N.} /usr/xbin
26 path_$d?= ${d:${MOD_OPT}:${MOD_HOMES}}/
27 paths+= ${d:${MOD_OPT}:${MOD_HOMES}}
28 .endfor
30 modvarloop:
31 @echo "path_/usr/xbin=${path_/usr/xbin}"
32 @echo "paths=${paths}"
33 @echo "PATHS=${paths:tu}"