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
49 .ERROR
: Looks like
'sad' is upset.
53 make
: stopped in unit
-tests
78 make
: Graph cycles through `cycle
.2.99'
79 make: Graph cycles through `cycle.2.98'
80 make
: Graph cycles through `cycle
.2.97'
90 x="-DTHIS=\"this and that\""
91 cfl=-I/this -I"This or that" -Ithat "-DTHIS=\"this and that\""
92 a=one b="two and three"
94 a=ONE b="TWO AND THREE"
96 We expect an error next:
97 make: "forloop" line 38: Wrong number of words (9) in .for substitution list with 2 vars
98 make: Fatal errors encountered -- cannot continue
99 make: stopped in unit-tests
110 Expect: Unknown modifier 'Z
'
111 make: Unknown modifier 'Z
'
113 Expect: Unknown modifier 'Z
'
114 make: Unknown modifier 'Z
'
116 Expect: Unclosed variable specification for VAR
117 make: Unclosed variable specification (expecting '}') for "VAR" (value "Thevariable") modifier S
118 VAR:S,V,v,=Thevariable
119 Expect: Unclosed variable specification for VAR
120 make: Unclosed variable specification after complex modifier (expecting '}') for VAR
121 VAR:S,V,v,=Thevariable
122 Expect: Unclosed substitution for VAR (, missing)
123 make: Unclosed substitution for VAR (, missing)
125 LIB=a X_LIBS:M${LIB${LIB:tu}} is "/tmp/liba.a"
126 LIB=a X_LIBS:M*/lib${LIB}.a is "/tmp/liba.a"
127 LIB=a X_LIBS:M*/lib${LIB}.a:tu is "/TMP/LIBA.A"
128 LIB=b X_LIBS:M${LIB${LIB:tu}} is ""
129 LIB=b X_LIBS:M*/lib${LIB}.a is ""
130 LIB=b X_LIBS:M*/lib${LIB}.a:tu is ""
131 LIB=c X_LIBS:M${LIB${LIB:tu}} is ""
132 LIB=c X_LIBS:M*/lib${LIB}.a is ""
133 LIB=c X_LIBS:M*/lib${LIB}.a:tu is ""
134 LIB=d X_LIBS:M${LIB${LIB:tu}} is "/tmp/libd.a"
135 LIB=d X_LIBS:M*/lib${LIB}.a is "/tmp/libd.a"
136 LIB=d X_LIBS:M*/lib${LIB}.a:tu is "/TMP/LIBD.A"
137 LIB=e X_LIBS:M${LIB${LIB:tu}} is "/tmp/libe.a"
138 LIB=e X_LIBS:M*/lib${LIB}.a is "/tmp/libe.a"
139 LIB=e X_LIBS:M*/lib${LIB}.a:tu is "/TMP/LIBE.A"
141 path=':/bin
:/tmp
::/:.
:/no
/such
/dir:.
'
142 path='/bin
:/tmp
:/:/no
/such
/dir'
143 path='/bin
:/tmp
:/:/no
/such
/dir'
144 path='/bin
':'/tmp
':'/':'/no
/such
/dir'
145 path='/bin
':'/tmp
':'/':'/no
/such
/dir'
146 path_/usr/xbin=/opt/xbin/
147 paths=/bin /tmp / /no/such/dir /opt/xbin
148 PATHS=/BIN /TMP / /NO/SUCH/DIR /OPT/XBIN
150 LIST = one two three four five six seven eight nine ten
151 LIST:O = eight five four nine one seven six ten three two
156 make: Bad modifier `:OX' for LIST
158 make
: Bad modifier `
:OxXX
' for LIST
160 LIST="one two three four five six"
161 LIST:ts,="one,two,three,four,five,six"
162 LIST:ts/:tu="ONE/TWO/THREE/FOUR/FIVE/SIX"
163 LIST:ts::tu="ONE:TWO:THREE:FOUR:FIVE:SIX"
164 LIST:ts:tu="ONETWOTHREEFOURFIVESIX"
165 LIST:tu:ts/="ONE/TWO/THREE/FOUR/FIVE/SIX"
166 LIST:ts:="one:two:three:four:five:six"
167 LIST:ts="onetwothreefourfivesix"
168 LIST:ts:S/two/2/="one2threefourfivesix"
169 LIST:S/two/2/:ts="one2threefourfivesix"
170 LIST:ts/:S/two/2/="one/2/three/four/five/six"
171 Pretend the '/' in '/n
' etc. below are back-slashes.
178 LIST:ts/t="one two three four five six"
185 make: Bad modifier `:tx' for LIST
187 make
: Bad modifier `
:ts\x
' for LIST
188 LIST:ts/x:tu="\x:tu}"
190 FU_mod-ts:ts:T="cool" == cool?
191 B.${AAA:ts}="Baaa" == Baaa?
192 make: Bad modifier `:[]' for LIST
193 LIST
:[]="" is an error
194 LIST
:[0]="one two three four five six"
195 LIST
:[0x0]="one two three four five six"
196 LIST
:[000]="one two three four five six"
197 LIST
:[*]="one two three four five six"
198 LIST
:[@
]="one two three four five six"
199 LIST
:[0]:C
/ /,/="one,two three four five six"
200 LIST
:[0]:C
/ /,/g
="one,two,three,four,five,six"
201 LIST
:[0]:C
/ /,/1g
="one,two,three,four,five,six"
202 LIST
:[*]:C
/ /,/="one,two three four five six"
203 LIST
:[*]:C
/ /,/g
="one,two,three,four,five,six"
204 LIST
:[*]:C
/ /,/1g
="one,two,three,four,five,six"
205 LIST
:[@
]:C
/ /,/="one two three four five six"
206 LIST
:[@
]:C
/ /,/g
="one two three four five six"
207 LIST
:[@
]:C
/ /,/1g
="one two three four five six"
208 LIST
:[@
]:[0]:C
/ /,/="one,two three four five six"
209 LIST
:[0]:[@
]:C
/ /,/="one two three four five six"
210 LIST
:[@
]:[*]:C
/ /,/="one,two three four five six"
211 LIST
:[*]:[@
]:C
/ /,/="one two three four five six"
215 ESCAPEDSPACE
:[#
]="1" == 1 ?
217 REALLYSPACE
:[#
]="1" == 1 ?
219 LIST
:[0]:[#
]="1" == 1 ?
220 LIST
:[*]:[#
]="1" == 1 ?
226 ESCAPEDSPACE
:[1]="\ "
228 REALLYSPACE
:[1]="" == "" ?
229 REALLYSPACE
:[*]:[1]=" " == " " ?
231 make
: Bad modifier `
:[1.
]' for LIST
232 LIST:[1.]="" is an error
233 make: Bad modifier `:[1].' for LIST
234 LIST
:[1].
="}" is an error
239 make
: Bad modifier `
:[-]' for LIST
240 LIST:[-]="" is an error
241 make: Bad modifier `:[--]' for LIST
242 LIST
:[--]="" is an error
251 LIST
:[0]:[1]="one two three four five six"
252 LIST
:[*]:[1]="one two three four five six"
257 LIST
:[*]:C
/ /,/:[2]=""
258 LIST
:[*]:C
/ /,/:[*]:[2]=""
259 LIST
:[*]:C
/ /,/:[@
]:[2]="three"
260 make
: Bad modifier `
:[1.
]' for LIST
261 LIST:[1.]="" is an error
262 make: Bad modifier `:[1..]' for LIST
263 LIST
:[1..
]="" is an error
265 make
: Bad modifier `
:[1.
.1.
]' for LIST
266 LIST:[1..1.]="" is an error
267 LIST:[1..2]="one two"
268 LIST:[2..1]="two one"
269 LIST:[3..-2]="three four five"
270 LIST:[-4..4]="three four"
271 make: Bad modifier `:[0..1]' for LIST
272 LIST
:[0.
.1]="" is an error
273 make
: Bad modifier `
:[-1.
.0]' for LIST
274 LIST:[-1..0]="" is an error
275 LIST:[-1..1]="six five four three two one"
276 LIST:[0..0]="one two three four five six"
277 LIST:[3..99]="three four five six"
278 LIST:[-3..-99]="four three two one"
279 LIST:[-99..-3]="one two three four"
282 LIST:[${ZERO}]="one two three four five six"
283 LIST:[${ZERO}x${ONE}]="one"
285 LIST:[${MINUSONE}]="six"
286 LIST:[${STAR}]="one two three four five six"
287 LIST:[${AT}]="one two three four five six"
288 make: Bad modifier `:[${EMPTY' for LIST
289 LIST
:[$
{EMPTY
}]="" is an error
290 LIST
:[$
{LONGLIST
:[21]:S
/2//}]="one"
291 LIST
:[$
{LIST
:[#
]}]="six"
292 LIST
:[$
{LIST
:[$
{HASH
}]}]="six"
293 LIST
:S
/ /,/="one two three four five six"
294 LIST
:S
/ /,/W
="one,two three four five six"
295 LIST
:S
/ /,/gW
="one,two,three,four,five,six"
298 LIST
:C
/ /,/="one two three four five six"
299 LIST
:C
/ /,/W
="one,two three four five six"
300 LIST
:C
/ /,/gW
="one,two,three,four,five,six"
303 LIST
:tW
="one two three four five six"
304 LIST
:tw
="one two three four five six"
305 LIST
:tW
:C
/ /,/="one,two three four five six"
306 LIST
:tW
:C
/ /,/g
="one,two,three,four,five,six"
307 LIST
:tW
:C
/ /,/1g
="one,two,three,four,five,six"
308 LIST
:tw
:C
/ /,/="one two three four five six"
309 LIST
:tw
:C
/ /,/g
="one two three four five six"
310 LIST
:tw
:C
/ /,/1g
="one two three four five six"
311 LIST
:tw
:tW
:C
/ /,/="one,two three four five six"
312 LIST
:tW
:tw
:C
/ /,/="one two three four five six"
313 .TARGET
="phony" .PREFIX="phony" .IMPSRC=""
314 .TARGET
="all" .PREFIX="all" .IMPSRC=""
315 .TARGET
="ok" .PREFIX="ok" .IMPSRC=""
316 .TARGET
="also.ok" .PREFIX="also.ok" .IMPSRC=""
317 .TARGET
="bug" .PREFIX="bug" .IMPSRC=""
318 Posix says we should
execute the command as
if run by
system(3)
319 Expect
'Hello,' and
'World!'
323 a command prefixed by
'+' executes even with
-n
327 echo
"a command prefixed by '+' executes even with -n"
328 a command prefixed by
'+' executes even with
-n
333 echo
"a command prefixed by '+' executes even with -n"
334 a command prefixed by
'+' executes even with
-n
335 { echo another command
337 Now we expect an error...
338 *** Error code
1 (continuing
)
339 `all
' not remade because of errors.
342 FOOBAR = foobar fubar
347 The answer is unknown
348 The answer is unknown
356 UT_DOLLAR=This is $UT_FU
360 default FU=<v>fu</v> FOO=<v>foo</v> VAR=<v></v>
361 two FU=<v>bar</v> FOO=<v>goo</v> VAR=<v></v>
362 three FU=<v>bar</v> FOO=<v>goo</v> VAR=<v></v>
363 four FU=<v>bar</v> FOO=<v>goo</v> VAR=<v>Internal</v>
364 five FU=<v>bar</v> FOO=<v>goo</v> VAR=<v>Internal</v>
367 show-v v=override k=override
368 *** Error code 1 (ignored)
369 *** Error code 1 (ignored)