3 This is how a comment looks: # comment
5 make: "cond1" line 75: warning: extra else
6 make: "cond1" line 85: warning: extra else
8 A='other' B='unknown' C='clever' o='no,no'
14 !((var != var) && defined(name))
23 make: warning: String comparison operator should be either == or !=
24 make: Bad conditional expression `"0" > 0' in "0" > 0?OK:No
27 make: "error" line 3: just FYI
28 make: "error" line 4: warning: this could be serious
29 make: "error" line 5: this is fatal
30 UT_DOLLAR=This is $UT_FU
31 UT_FOO=foobar is fubar
35 UT_ALL=even this gets exported
37 UT_DOLLAR=This is $UT_FU
39 UT_FOO=foobar is fubar
57 .ERROR: Looks like 'sad' is upset.
61 make: stopped in unit-tests
86 make: Graph cycles through `cycle.2.99'
87 make: Graph cycles through `cycle.2.98'
88 make: Graph cycles through `cycle.2.97'
98 x="-DTHIS=\"this and that\""
99 cfl=-I/this -I"This or that" -Ithat "-DTHIS=\"this and that\""
100 a=one b="two and three"
102 a=ONE b="TWO AND THREE"
104 We expect an error next:
105 make: "forloop" line 38: Wrong number of words (9) in .for substitution list with 2 vars
106 make: Fatal errors encountered -- cannot continue
107 make: stopped in unit-tests
118 Expect: Unknown modifier 'Z'
119 make: Unknown modifier 'Z'
121 Expect: Unknown modifier 'Z'
122 make: Unknown modifier 'Z'
124 Expect: Unclosed variable specification for VAR
125 make: Unclosed variable specification (expecting '}') for "VAR" (value "Thevariable") modifier S
126 VAR:S,V,v,=Thevariable
127 Expect: Unclosed variable specification for VAR
128 make: Unclosed variable specification after complex modifier (expecting '}') for VAR
129 VAR:S,V,v,=Thevariable
130 Expect: Unclosed substitution for VAR (, missing)
131 make: Unclosed substitution for VAR (, missing)
133 LIB=a X_LIBS:M${LIB${LIB:tu}} is "/tmp/liba.a"
134 LIB=a X_LIBS:M*/lib${LIB}.a is "/tmp/liba.a"
135 LIB=a X_LIBS:M*/lib${LIB}.a:tu is "/TMP/LIBA.A"
136 LIB=b X_LIBS:M${LIB${LIB:tu}} is ""
137 LIB=b X_LIBS:M*/lib${LIB}.a is ""
138 LIB=b X_LIBS:M*/lib${LIB}.a:tu is ""
139 LIB=c X_LIBS:M${LIB${LIB:tu}} is ""
140 LIB=c X_LIBS:M*/lib${LIB}.a is ""
141 LIB=c X_LIBS:M*/lib${LIB}.a:tu is ""
142 LIB=d X_LIBS:M${LIB${LIB:tu}} is "/tmp/libd.a"
143 LIB=d X_LIBS:M*/lib${LIB}.a is "/tmp/libd.a"
144 LIB=d X_LIBS:M*/lib${LIB}.a:tu is "/TMP/LIBD.A"
145 LIB=e X_LIBS:M${LIB${LIB:tu}} is "/tmp/libe.a"
146 LIB=e X_LIBS:M*/lib${LIB}.a is "/tmp/libe.a"
147 LIB=e X_LIBS:M*/lib${LIB}.a:tu is "/TMP/LIBE.A"
149 path=':/bin:/tmp::/:.:/no/such/dir:.'
150 path='/bin:/tmp:/:/no/such/dir'
151 path='/bin:/tmp:/:/no/such/dir'
152 path='/bin':'/tmp':'/':'/no/such/dir'
153 path='/bin':'/tmp':'/':'/no/such/dir'
154 path_/usr/xbin=/opt/xbin/
155 paths=/bin /tmp / /no/such/dir /opt/xbin
156 PATHS=/BIN /TMP / /NO/SUCH/DIR /OPT/XBIN
158 LIST = one two three four five six seven eight nine ten
159 LIST:O = eight five four nine one seven six ten three two
164 make: Bad modifier `:OX' for LIST
166 make: Bad modifier `:OxXX' for LIST
168 LIST="one two three four five six"
169 LIST:ts,="one,two,three,four,five,six"
170 LIST:ts/:tu="ONE/TWO/THREE/FOUR/FIVE/SIX"
171 LIST:ts::tu="ONE:TWO:THREE:FOUR:FIVE:SIX"
172 LIST:ts:tu="ONETWOTHREEFOURFIVESIX"
173 LIST:tu:ts/="ONE/TWO/THREE/FOUR/FIVE/SIX"
174 LIST:ts:="one:two:three:four:five:six"
175 LIST:ts="onetwothreefourfivesix"
176 LIST:ts:S/two/2/="one2threefourfivesix"
177 LIST:S/two/2/:ts="one2threefourfivesix"
178 LIST:ts/:S/two/2/="one/2/three/four/five/six"
179 Pretend the '/' in '/n' etc. below are back-slashes.
186 LIST:ts/t="one two three four five six"
193 make: Bad modifier `:tx' for LIST
195 make: Bad modifier `:ts\x' for LIST
196 LIST:ts/x:tu="\x:tu}"
198 FU_mod-ts:ts:T="cool" == cool?
199 B.${AAA:ts}="Baaa" == Baaa?
200 make: Bad modifier `:[]' for LIST
201 LIST:[]="" is an error
202 LIST:[0]="one two three four five six"
203 LIST:[0x0]="one two three four five six"
204 LIST:[000]="one two three four five six"
205 LIST:[*]="one two three four five six"
206 LIST:[@]="one two three four five six"
207 LIST:[0]:C/ /,/="one,two three four five six"
208 LIST:[0]:C/ /,/g="one,two,three,four,five,six"
209 LIST:[0]:C/ /,/1g="one,two,three,four,five,six"
210 LIST:[*]:C/ /,/="one,two three four five six"
211 LIST:[*]:C/ /,/g="one,two,three,four,five,six"
212 LIST:[*]:C/ /,/1g="one,two,three,four,five,six"
213 LIST:[@]:C/ /,/="one two three four five six"
214 LIST:[@]:C/ /,/g="one two three four five six"
215 LIST:[@]:C/ /,/1g="one two three four five six"
216 LIST:[@]:[0]:C/ /,/="one,two three four five six"
217 LIST:[0]:[@]:C/ /,/="one two three four five six"
218 LIST:[@]:[*]:C/ /,/="one,two three four five six"
219 LIST:[*]:[@]:C/ /,/="one two three four five six"
223 ESCAPEDSPACE:[#]="1" == 1 ?
225 REALLYSPACE:[#]="1" == 1 ?
227 LIST:[0]:[#]="1" == 1 ?
228 LIST:[*]:[#]="1" == 1 ?
234 ESCAPEDSPACE:[1]="\ "
236 REALLYSPACE:[1]="" == "" ?
237 REALLYSPACE:[*]:[1]=" " == " " ?
239 make: Bad modifier `:[1.]' for LIST
240 LIST:[1.]="" is an error
241 make: Bad modifier `:[1].' for LIST
242 LIST:[1].="}" is an error
247 make: Bad modifier `:[-]' for LIST
248 LIST:[-]="" is an error
249 make: Bad modifier `:[--]' for LIST
250 LIST:[--]="" is an error
259 LIST:[0]:[1]="one two three four five six"
260 LIST:[*]:[1]="one two three four five six"
265 LIST:[*]:C/ /,/:[2]=""
266 LIST:[*]:C/ /,/:[*]:[2]=""
267 LIST:[*]:C/ /,/:[@]:[2]="three"
268 make: Bad modifier `:[1.]' for LIST
269 LIST:[1.]="" is an error
270 make: Bad modifier `:[1..]' for LIST
271 LIST:[1..]="" is an error
273 make: Bad modifier `:[1..1.]' for LIST
274 LIST:[1..1.]="" is an error
275 LIST:[1..2]="one two"
276 LIST:[2..1]="two one"
277 LIST:[3..-2]="three four five"
278 LIST:[-4..4]="three four"
279 make: Bad modifier `:[0..1]' for LIST
280 LIST:[0..1]="" is an error
281 make: Bad modifier `:[-1..0]' for LIST
282 LIST:[-1..0]="" is an error
283 LIST:[-1..1]="six five four three two one"
284 LIST:[0..0]="one two three four five six"
285 LIST:[3..99]="three four five six"
286 LIST:[-3..-99]="four three two one"
287 LIST:[-99..-3]="one two three four"
290 LIST:[${ZERO}]="one two three four five six"
291 LIST:[${ZERO}x${ONE}]="one"
293 LIST:[${MINUSONE}]="six"
294 LIST:[${STAR}]="one two three four five six"
295 LIST:[${AT}]="one two three four five six"
296 make: Bad modifier `:[${EMPTY' for LIST
297 LIST:[${EMPTY}]="" is an error
298 LIST:[${LONGLIST:[21]:S/2//}]="one"
299 LIST:[${LIST:[#]}]="six"
300 LIST:[${LIST:[${HASH}]}]="six"
301 LIST:S/ /,/="one two three four five six"
302 LIST:S/ /,/W="one,two three four five six"
303 LIST:S/ /,/gW="one,two,three,four,five,six"
306 LIST:C/ /,/="one two three four five six"
307 LIST:C/ /,/W="one,two three four five six"
308 LIST:C/ /,/gW="one,two,three,four,five,six"
311 LIST:tW="one two three four five six"
312 LIST:tw="one two three four five six"
313 LIST:tW:C/ /,/="one,two three four five six"
314 LIST:tW:C/ /,/g="one,two,three,four,five,six"
315 LIST:tW:C/ /,/1g="one,two,three,four,five,six"
316 LIST:tw:C/ /,/="one two three four five six"
317 LIST:tw:C/ /,/g="one two three four five six"
318 LIST:tw:C/ /,/1g="one two three four five six"
319 LIST:tw:tW:C/ /,/="one,two three four five six"
320 LIST:tW:tw:C/ /,/="one two three four five six"
323 Making the.o from the.h the.c
324 .TARGET="phony" .PREFIX="phony" .IMPSRC=""
325 .TARGET="all" .PREFIX="all" .IMPSRC=""
326 .TARGET="ok" .PREFIX="ok" .IMPSRC=""
327 .TARGET="also.ok" .PREFIX="also.ok" .IMPSRC=""
328 .TARGET="bug" .PREFIX="bug" .IMPSRC=""
329 Posix says we should execute the command as if run by system(3)
330 Expect 'Hello,' and 'World!'
334 a command prefixed by '+' executes even with -n
338 echo "a command prefixed by '+' executes even with -n"
339 a command prefixed by '+' executes even with -n
344 echo "a command prefixed by '+' executes even with -n"
345 a command prefixed by '+' executes even with -n
346 { echo another command
348 Now we expect an error...
349 *** Error code 1 (continuing)
350 `all' not remade because of errors.
356 FOOBAR = foobar fubar
361 The answer is unknown
362 The answer is unknown
370 UT_DOLLAR=This is $UT_FU
374 default FU=<v>fu</v> FOO=<v>foo</v> VAR=<v></v>
375 two FU=<v>bar</v> FOO=<v>goo</v> VAR=<v></v>
376 three FU=<v>bar</v> FOO=<v>goo</v> VAR=<v></v>
377 four FU=<v>bar</v> FOO=<v>goo</v> VAR=<v>Internal</v>
378 five FU=<v>bar</v> FOO=<v>goo</v> VAR=<v>Internal</v>
381 show-v v=override k=override
382 *** Error code 1 (ignored)
383 *** Error code 1 (ignored)