1# $FreeBSD$ 2 3DATA1= helllo 4DATA2:= ${DATA1} 5DATA3= ${DATA2:S/ll/rr/g} 6DATA4:= ${DATA2:S/ll/rr/g} 7DATA2?= allo 8DATA5:= ${DATA2:S/ll/ii/g} ${DATA1:S/ll/rr/g} 9DATA2= yello 10DATA1:= ${DATA5:S/l/r/g} 11NIL= 12 13all: 14 @echo "Running test variables" 15 @echo 1:${DATA1} 2:${DATA2} 3:${DATA3} 4:${DATA4} 5:${DATA5} | \ 16 diff -u ${.CURDIR}/regress.variables.out - || ${MAKE} failure 17 @echo "PASS: Test variables detected no regression, output matches." 18 @echo "Running test targets" 19 @${MAKE} double || ${MAKE} failure 20 @echo "PASS: Test targets detected no regression." 21 @echo "Running test sysvmatch" 22 @${MAKE} sysvmatch || ${MAKE} failure 23 @echo "PASS: Test sysvmatch detected no regression." 24 25# Doubly-defined targets. NetBSD make(1) will warn, ours will silently use the 26# ``right'' one. 27double: 28 @true 29 30double: 31 @false 32 33# Some versions of FreeBSD make(1) do not handle a nil LHS in sysvsubst. 34sysvmatch: 35 @echo EMPTY ${NIL:=foo} LHS | \ 36 diff -u ${.CURDIR}/regress.sysvmatch.out - || false 37 38failure: 39 @echo "FAIL: Test failed: regression detected. See above." 40 @false 41