Makefile (222295) | Makefile (238143) |
---|---|
1# $FreeBSD: head/tools/build/make_check/Makefile 222295 2011-05-25 23:33:49Z obrien $ | 1# $FreeBSD: head/tools/build/make_check/Makefile 238143 2012-07-05 18:23:36Z obrien $ |
2 3.MAKE.MODE= normal 4 5# Test for broken LHS expansion. 6# This *must* cause make(1) to detect a recursive variable, and fail as such. 7.if make(lhs_expn) 8FOO= ${BAR} 9BAR${NIL}= ${FOO} --- 8 unchanged lines hidden (view full) --- 18DATA5:= ${DATA2:S/ll/ii/g} ${DATA1:S/ll/rr/g} 19DATA2= yello 20DATA1:= ${DATA5:S/l/r/g} 21NIL= 22 23SMAKE= MAKEFLAGS= ${MAKE} -C ${.CURDIR} 24 25all: | 2 3.MAKE.MODE= normal 4 5# Test for broken LHS expansion. 6# This *must* cause make(1) to detect a recursive variable, and fail as such. 7.if make(lhs_expn) 8FOO= ${BAR} 9BAR${NIL}= ${FOO} --- 8 unchanged lines hidden (view full) --- 18DATA5:= ${DATA2:S/ll/ii/g} ${DATA1:S/ll/rr/g} 19DATA2= yello 20DATA1:= ${DATA5:S/l/r/g} 21NIL= 22 23SMAKE= MAKEFLAGS= ${MAKE} -C ${.CURDIR} 24 25all: |
26 @echo '1..17' | 26 @echo '1..16' |
27 @${SMAKE} C_check || { cd ${.CURDIR} ; ${MAKE} failure ; } 28 @echo "ok 1 - C_check # Test of -C flag existence detected no regression." 29 @echo 1:${DATA1} 2:${DATA2} 3:${DATA3} 4:${DATA4} 5:${DATA5} | \ 30 diff -u ${.CURDIR}/regress.variables.out - || \ 31 ${SMAKE} failure 32 @echo "ok 2 - test_variables # Test variables detected no regression, output matches." 33 @${SMAKE} double 2>/dev/null || ${SMAKE} failure 34 @echo "ok 3 - test_targets # Test targets detected no regression." 35 @${SMAKE} sysvmatch || ${SMAKE} failure 36 @echo "ok 4 - sysvmatch # Test sysvmatch detected no regression." 37 @! ${SMAKE} lhs_expn && true || ${SMAKE} failure 38 @echo "ok 5 lhs_expn # Test lhs_expn detected no regression." 39 @${SMAKE} notdef || ${SMAKE} failure 40 @echo "ok 6 - notdef # Test notdef detected no regression." 41 @${SMAKE} modifiers || ${SMAKE} failure 42 @echo "ok 7 - modifiers # Test modifiers detected no regression." | 27 @${SMAKE} C_check || { cd ${.CURDIR} ; ${MAKE} failure ; } 28 @echo "ok 1 - C_check # Test of -C flag existence detected no regression." 29 @echo 1:${DATA1} 2:${DATA2} 3:${DATA3} 4:${DATA4} 5:${DATA5} | \ 30 diff -u ${.CURDIR}/regress.variables.out - || \ 31 ${SMAKE} failure 32 @echo "ok 2 - test_variables # Test variables detected no regression, output matches." 33 @${SMAKE} double 2>/dev/null || ${SMAKE} failure 34 @echo "ok 3 - test_targets # Test targets detected no regression." 35 @${SMAKE} sysvmatch || ${SMAKE} failure 36 @echo "ok 4 - sysvmatch # Test sysvmatch detected no regression." 37 @! ${SMAKE} lhs_expn && true || ${SMAKE} failure 38 @echo "ok 5 lhs_expn # Test lhs_expn detected no regression." 39 @${SMAKE} notdef || ${SMAKE} failure 40 @echo "ok 6 - notdef # Test notdef detected no regression." 41 @${SMAKE} modifiers || ${SMAKE} failure 42 @echo "ok 7 - modifiers # Test modifiers detected no regression." |
43 @${SMAKE} funny_targets || ${SMAKE} failure 44 @echo "ok 8 funny_targets # Test funny_targets detected no regression." | |
45 @${SMAKE} arith_expr || ${SMAKE} failure | 43 @${SMAKE} arith_expr || ${SMAKE} failure |
46 @echo "ok 9 arith_expr # Test arith_expr detected no regression." | 44 @echo "ok 8 arith_expr # Test arith_expr detected no regression." |
47 @${SMAKE} PATH_exists || ${SMAKE} failure | 45 @${SMAKE} PATH_exists || ${SMAKE} failure |
48 @echo "ok 10 PATH_exists # Test PATH_exists detected no regression." | 46 @echo "ok 9 PATH_exists # Test PATH_exists detected no regression." |
49 @${SMAKE} double_quotes || ${SMAKE} failure | 47 @${SMAKE} double_quotes || ${SMAKE} failure |
50 @echo "ok 11 double_quotes # Test double_quotes detected no regression." | 48 @echo "ok 10 double_quotes # Test double_quotes detected no regression." |
51 @! ${SMAKE} double_quotes2 >/dev/null 2>&1 && true || ${SMAKE} failure | 49 @! ${SMAKE} double_quotes2 >/dev/null 2>&1 && true || ${SMAKE} failure |
52 @echo "ok 12 double_quotes2 # Test double_quotes2 detected no regression." | 50 @echo "ok 11 double_quotes2 # Test double_quotes2 detected no regression." |
53 @${SMAKE} pass_cmd_vars || ${SMAKE} failure | 51 @${SMAKE} pass_cmd_vars || ${SMAKE} failure |
54 @echo "ok 13 pass_cmd_vars # Test pass_cmd_vars detected no regression." | 52 @echo "ok 12 pass_cmd_vars # Test pass_cmd_vars detected no regression." |
55 @${SMAKE} plus_flag || ${SMAKE} failure | 53 @${SMAKE} plus_flag || ${SMAKE} failure |
56 @echo "ok 14 plus_flag # Test plus_flag detected no regression." | 54 @echo "ok 13 plus_flag # Test plus_flag detected no regression." |
57 @! ${SMAKE} shell >/dev/null 2>&1 && true || ${SMAKE} failure | 55 @! ${SMAKE} shell >/dev/null 2>&1 && true || ${SMAKE} failure |
58 @echo "ok 15 shell # Test shell detected no regression." | 56 @echo "ok 14 shell # Test shell detected no regression." |
59 @${SMAKE} shell_1 || ${SMAKE} failure | 57 @${SMAKE} shell_1 || ${SMAKE} failure |
60 @echo "ok 16 shell_1 # Test shell_1 detected no regression." | 58 @echo "ok 15 shell_1 # Test shell_1 detected no regression." |
61 @${SMAKE} shell_2 || ${SMAKE} failure | 59 @${SMAKE} shell_2 || ${SMAKE} failure |
62 @echo "ok 17 shell_2 # Test shell_2 detected no regression." | 60 @echo "ok 16 shell_2 # Test shell_2 detected no regression." |
63 64.if make(C_check) 65C_check: 66.endif 67 68.if make(double) 69# Doubly-defined targets. make(1) will warn, but use the "right" one. If it 70# switches to using the "non-right" one, it breaks things worse than a little --- 31 unchanged lines hidden (view full) --- 102# See if make(1) supports the C modifier. 103modifiers: 104 @if ${SMAKE} -V .CURDIR:C/.// 2>&1 >/dev/null | \ 105 grep -q "Unknown modifier 'C'"; then \ 106 false; \ 107 fi 108.endif 109 | 61 62.if make(C_check) 63C_check: 64.endif 65 66.if make(double) 67# Doubly-defined targets. make(1) will warn, but use the "right" one. If it 68# switches to using the "non-right" one, it breaks things worse than a little --- 31 unchanged lines hidden (view full) --- 100# See if make(1) supports the C modifier. 101modifiers: 102 @if ${SMAKE} -V .CURDIR:C/.// 2>&1 >/dev/null | \ 103 grep -q "Unknown modifier 'C'"; then \ 104 false; \ 105 fi 106.endif 107 |
110.if make(funny_targets) 111funny_targets: colons::target exclamation!target 112colons::target: 113exclamation!target: 114.endif 115 | |
116.if make(arith_expr) 117arith_expr: 118# See if arithmetic expression parsing is broken. 119# The different spacing below is intentional. 120VALUE= 0 121.if (${VALUE} < 0)||(${VALUE}>0) 122.endif 123.endif --- 174 unchanged lines hidden --- | 108.if make(arith_expr) 109arith_expr: 110# See if arithmetic expression parsing is broken. 111# The different spacing below is intentional. 112VALUE= 0 113.if (${VALUE} < 0)||(${VALUE}>0) 114.endif 115.endif --- 174 unchanged lines hidden --- |