Makefile (00e13b1d679d242d6db62cab43303efe327afdbc) Makefile (7b54cdda4e5d7bf71170366d59f76889ead62c9e)
1# $FreeBSD$
2
3# Test for broken LHS expansion.
4# This *must* cause make(1) to detect a recursive variable, and fail as such.
5.if make(lhs_expn)
6FOO= ${BAR}
7BAR${NIL}= ${FOO}
8FOO${BAR}= ${FOO}

--- 5 unchanged lines hidden (view full) ---

14DATA4:= ${DATA2:S/ll/rr/g}
15DATA2?= allo
16DATA5:= ${DATA2:S/ll/ii/g} ${DATA1:S/ll/rr/g}
17DATA2= yello
18DATA1:= ${DATA5:S/l/r/g}
19NIL=
20
21all:
1# $FreeBSD$
2
3# Test for broken LHS expansion.
4# This *must* cause make(1) to detect a recursive variable, and fail as such.
5.if make(lhs_expn)
6FOO= ${BAR}
7BAR${NIL}= ${FOO}
8FOO${BAR}= ${FOO}

--- 5 unchanged lines hidden (view full) ---

14DATA4:= ${DATA2:S/ll/rr/g}
15DATA2?= allo
16DATA5:= ${DATA2:S/ll/ii/g} ${DATA1:S/ll/rr/g}
17DATA2= yello
18DATA1:= ${DATA5:S/l/r/g}
19NIL=
20
21all:
22 @echo '1..14'
22 @echo '1..16'
23 @echo 1:${DATA1} 2:${DATA2} 3:${DATA3} 4:${DATA4} 5:${DATA5} | \
24 diff -u ${.CURDIR}/regress.variables.out - || ${MAKE} failure
25 @echo "ok 1 - test_variables # Test variables detected no regression, output matches."
26 @${MAKE} double 2>/dev/null || ${MAKE} failure
27 @echo "ok 2 - test_targets # Test targets detected no regression."
28 @${MAKE} sysvmatch || ${MAKE} failure
29 @echo "ok 3 - sysvmatch # Test sysvmatch detected no regression."
30 @! ${MAKE} lhs_expn && true || ${MAKE} failure

--- 13 unchanged lines hidden (view full) ---

44 @! ${MAKE} double_quotes2 >/dev/null 2>&1 && true || ${MAKE} failure
45 @echo "ok 11 double_quotes2 # Test double_quotes2 detected no regression."
46 @${MAKE} pass_cmd_vars || ${MAKE} failure
47 @echo "ok 12 pass_cmd_vars # Test pass_cmd_vars detected no regression."
48 @${MAKE} plus_flag || ${MAKE} failure
49 @echo "ok 13 plus_flag # Test plus_flag detected no regression."
50 @! ${MAKE} shell >/dev/null 2>&1 && true || ${MAKE} failure
51 @echo "ok 14 shell # Test shell detected no regression."
23 @echo 1:${DATA1} 2:${DATA2} 3:${DATA3} 4:${DATA4} 5:${DATA5} | \
24 diff -u ${.CURDIR}/regress.variables.out - || ${MAKE} failure
25 @echo "ok 1 - test_variables # Test variables detected no regression, output matches."
26 @${MAKE} double 2>/dev/null || ${MAKE} failure
27 @echo "ok 2 - test_targets # Test targets detected no regression."
28 @${MAKE} sysvmatch || ${MAKE} failure
29 @echo "ok 3 - sysvmatch # Test sysvmatch detected no regression."
30 @! ${MAKE} lhs_expn && true || ${MAKE} failure

--- 13 unchanged lines hidden (view full) ---

44 @! ${MAKE} double_quotes2 >/dev/null 2>&1 && true || ${MAKE} failure
45 @echo "ok 11 double_quotes2 # Test double_quotes2 detected no regression."
46 @${MAKE} pass_cmd_vars || ${MAKE} failure
47 @echo "ok 12 pass_cmd_vars # Test pass_cmd_vars detected no regression."
48 @${MAKE} plus_flag || ${MAKE} failure
49 @echo "ok 13 plus_flag # Test plus_flag detected no regression."
50 @! ${MAKE} shell >/dev/null 2>&1 && true || ${MAKE} failure
51 @echo "ok 14 shell # Test shell detected no regression."
52 @${MAKE} shell_1 || ${MAKE} failure
53 @echo "ok 15 shell_1 # Test shell_1 detected no regression."
54 @${MAKE} shell_2 || ${MAKE} failure
55 @echo "ok 16 shell_2 # Test shell_2 detected no regression."
52
53.if make(double)
54# Doubly-defined targets. make(1) will warn, but use the "right" one. If it
55# switches to using the "non-right" one, it breaks things worse than a little
56# regression test.
57double:
58 @true
59

--- 168 unchanged lines hidden (view full) ---

228
229.if make(shell)
230# Test if make fully supports the .SHELL specification.
231.SHELL: path=/nonexistent
232A!= echo ok
233shell:
234.endif
235
56
57.if make(double)
58# Doubly-defined targets. make(1) will warn, but use the "right" one. If it
59# switches to using the "non-right" one, it breaks things worse than a little
60# regression test.
61double:
62 @true
63

--- 168 unchanged lines hidden (view full) ---

232
233.if make(shell)
234# Test if make fully supports the .SHELL specification.
235.SHELL: path=/nonexistent
236A!= echo ok
237shell:
238.endif
239
240.if make(shell_1)
241# Test if setting the shell by name only works. Because we have no ksh
242# in the base system we test that we can set sh and csh. We try only exact
243# matching names and do not exercise the rather strange matching algorithm.
244shell_1:
245 @${MAKE} shell_1_csh
246 @${MAKE} shell_1_sh
247.endif
248.if make(shell_1_csh)
249.SHELL: name="csh"
250shell_1_csh:
251 @echo $${shell} | grep -q '^/bin/csh$$'
252.endif
253.if make(shell_1_sh)
254.SHELL: name="sh"
255shell_1_sh:
256 @ps -ax -opid,command | awk '$$1=="'$$$$'" { print $$2 }' | grep -q '^/bin/sh$$'
257.endif
258
259.if make(shell_2)
260# Test if we can replace the shell specification. We do this by using
261# a shell scripts that prints us its arguments and standard input as the shell
262shell_2:
263 @${MAKE} -B shell_2B | \
264 diff -u ${.CURDIR}/regress.shell_2B.out - || false
265 @${MAKE} -j1 shell_2j | \
266 diff -u ${.CURDIR}/regress.shell_2j.out - || false
267.endif
268
269.if make(shell_2B)
270.SHELL: name="echo" path="${.CURDIR}/shell_test" quiet="be quiet" echo="be verbose" filter="be verbose" echoFlag="x" errFlag="y" hasErrCtl=y check="check errors" ignore="ignore errors"
271
272shell_2B:
273 -@funny $$
274 funnier $$
275.endif
276
277.if make(shell_2j)
278.SHELL: name="echo" path="${.CURDIR}/shell_test" quiet="be quiet" echo="be verbose" filter="be verbose" echoFlag="x" errFlag="y" hasErrCtl=y check="check errors" ignore="ignore errors"
279
280shell_2j:
281 -@funny $$
282 funnier $$
283.endif
284
236failure:
237 @echo "not ok # Test failed: regression detected. See above."
238 @false
285failure:
286 @echo "not ok # Test failed: regression detected. See above."
287 @false