Merge illumos-gate
[unleashed.git] / bin / make / unit-tests / posix1.exp
blob92809e61c690ee96a91b140213ff1b3b2772c2da
1 ${VAR} = "foo bar baz"
5 foo baR baz, bar baz, foo bar baz, fooadd baradd bazadd
6 mkdir -p 'dir'
7 touch 'dir/obj_1.h'
8 mkdir -p 'dir'
9 printf '#include "obj_1.h"\nconst char* obj_1 = "dir/obj_1.c";\n' \
10 >'dir/obj_1.c'
11 Local variables
12 ${@}="dir/obj_1.o" ${<}="dir/obj_1.c"
13 ${*}="dir/obj_1" ${?}="dir/obj_1.h dir/obj_1.c"
14 ${%}=""
16 Directory and filename parts of local variables
17 ${@D}="dir" ${@F}="obj_1.o"
18 ${<D}="dir" ${<F}="obj_1.c"
19 ${*D}="dir" ${*F}="obj_1"
20 ${?D}="dir dir" ${?F}="obj_1.h obj_1.c"
21 ${%D}="" ${%F}=""
23 Local variable substitutions
24 ${@:.o=}="dir/obj_1" ${<:.c=.C}="dir/obj_1.C"
25 ${*:=.h}="dir/obj_1.h" ${?:.h=.H}="dir/obj_1.H dir/obj_1.c"
26 ${%:=}=""
28 Target with suffix transformations
29 ${@D:=append}="dirappend"
30 ${@F:.o=.O}="obj_1.O"
32 Implied source with suffix transformations
33 ${<D:r=rr}="dirr"
34 ${<F:.c=.C}="obj_1.C"
36 Suffixless target with suffix transformations
37 ${*D:.=dot}="dir"
38 ${*F:.a=}="obj_1"
40 Out-of-date dependencies with suffix transformations
41 ${?D:ir=}="d d"
42 ${?F:.h=.H}="obj_1.H obj_1.c"
44 Member with suffix transformations
45 ${%D:.=}=""
46 ${%F:${VAR2}=${VAR}}=""
48 cc -c -o 'dir/obj_1.o' 'dir/obj_1.c'
49 mkdir -p '.'
50 touch 'dummy'
51 Local variables
52 ${@}="lib.a" ${<}="dir/obj_1.o"
53 ${*}="obj1" ${?}="dir/obj_1.o dummy"
54 ${%}="obj1.o"
56 Directory and filename parts of local variables
57 ${@D}="." ${@F}="lib.a"
58 ${<D}="dir" ${<F}="obj_1.o"
59 ${*D}="." ${*F}="obj1"
60 ${?D}="dir ." ${?F}="obj_1.o dummy"
61 ${%D}="." ${%F}="obj1.o"
63 Local variable substitutions
64 ${@:.o=}="lib.a" ${<:.c=.C}="dir/obj_1.o"
65 ${*:=.h}="obj1.h" ${?:.h=.H}="dir/obj_1.o dummy"
66 ${%:=}="obj1.o"
68 Target with suffix transformations
69 ${@D:=append}=".append"
70 ${@F:.o=.O}="lib.a"
72 Implied source with suffix transformations
73 ${<D:r=rr}="dirr"
74 ${<F:.c=.C}="obj_1.o"
76 Suffixless target with suffix transformations
77 ${*D:.=dot}="dot"
78 ${*F:.a=}="obj1"
80 Out-of-date dependencies with suffix transformations
81 ${?D:ir=}="d ."
82 ${?F:.h=.H}="obj_1.o dummy"
84 Member with suffix transformations
85 ${%D:.=}=""
86 ${%F:${VAR2}=${VAR}}="obj1foo bar baz"
88 cp 'dir/obj_1.o' 'obj1.o'
89 ar -rcv 'lib.a' 'obj1.o'
90 a - obj1.o
91 rm -f 'obj1.o'
92 mkdir -p '.'
93 printf '#include "obj_2.h"\nconst char* obj_2 = "obj_2.c";\n' \
94 >'obj_2.c'
95 mkdir -p '.'
96 touch 'obj_2.h'
97 Local variables
98 ${@}="obj2.o" ${<}="obj_2.c"
99 ${*}="obj2" ${?}="obj_2.c obj_2.h dir/obj_1.h"
100 ${%}=""
102 Directory and filename parts of local variables
103 ${@D}="." ${@F}="obj2.o"
104 ${<D}="." ${<F}="obj_2.c"
105 ${*D}="." ${*F}="obj2"
106 ${?D}=". . dir" ${?F}="obj_2.c obj_2.h obj_1.h"
107 ${%D}="" ${%F}=""
109 Local variable substitutions
110 ${@:.o=}="obj2" ${<:.c=.C}="obj_2.C"
111 ${*:=.h}="obj2.h" ${?:.h=.H}="obj_2.c obj_2.H dir/obj_1.H"
112 ${%:=}=""
114 Target with suffix transformations
115 ${@D:=append}=".append"
116 ${@F:.o=.O}="obj2.O"
118 Implied source with suffix transformations
119 ${<D:r=rr}="."
120 ${<F:.c=.C}="obj_2.C"
122 Suffixless target with suffix transformations
123 ${*D:.=dot}="dot"
124 ${*F:.a=}="obj2"
126 Out-of-date dependencies with suffix transformations
127 ${?D:ir=}=". . d"
128 ${?F:.h=.H}="obj_2.c obj_2.H obj_1.H"
130 Member with suffix transformations
131 ${%D:.=}=""
132 ${%F:${VAR2}=${VAR}}=""
134 cc -c -o 'obj2.o' 'obj_2.c'
135 ar -rcv 'lib.a' 'obj2.o'
136 a - obj2.o
137 mkdir -p '.'
138 touch 'obj3.h'
139 mkdir -p 'dir'
140 touch 'dir/dummy'
141 mkdir -p '.'
142 printf '#include "obj3.h"\nconst char* obj3 = "obj3.c";\n' \
143 >'obj3.c'
144 Local variables
145 ${@}="lib.a" ${<}="obj3.c"
146 ${*}="obj3" ${?}="obj3.h dir/dummy obj3.c"
147 ${%}="obj3.o"
149 Directory and filename parts of local variables
150 ${@D}="." ${@F}="lib.a"
151 ${<D}="." ${<F}="obj3.c"
152 ${*D}="." ${*F}="obj3"
153 ${?D}=". dir ." ${?F}="obj3.h dummy obj3.c"
154 ${%D}="." ${%F}="obj3.o"
156 Local variable substitutions
157 ${@:.o=}="lib.a" ${<:.c=.C}="obj3.C"
158 ${*:=.h}="obj3.h" ${?:.h=.H}="obj3.H dir/dummy obj3.c"
159 ${%:=}="obj3.o"
161 Target with suffix transformations
162 ${@D:=append}=".append"
163 ${@F:.o=.O}="lib.a"
165 Implied source with suffix transformations
166 ${<D:r=rr}="."
167 ${<F:.c=.C}="obj3.C"
169 Suffixless target with suffix transformations
170 ${*D:.=dot}="dot"
171 ${*F:.a=}="obj3"
173 Out-of-date dependencies with suffix transformations
174 ${?D:ir=}=". d ."
175 ${?F:.h=.H}="obj3.H dummy obj3.c"
177 Member with suffix transformations
178 ${%D:.=}=""
179 ${%F:${VAR2}=${VAR}}="obj3foo bar baz"
181 cc -c -o 'obj3.o' 'obj3.c'
182 ar -rcv 'lib.a' 'obj3.o'
183 a - obj3.o
184 rm -f 'obj3.o'
185 exit status 0