update dev300-m58
[ooovba.git] / dmake / tests / misc-11
blob93829497474c55155b9faf60c19f2fb7ea6cb5bd
1 #!/bin/sh
3 # 16.06.2006 Volker Quetschke
4 # A comparison with the empty string crashes dmake - equality test with empty
5 # string must work too.
6 # (issue 65281)
8 : ${DMAKEPROG:=dmake}
9 file1="mfile1.mk"
10 tmpfiles="$file1"
12 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
14 # Remove files from prior failed run
15 rm -rf $tmpfiles
17 # Remember to quote variables in generated makefiles( $ -> \$ ).
18 cat > $file1 <<EOT
19 SHELL*:=/bin/sh
20 SHELLFLAGS*:=-ce
22 RHS=
24 all:
25 .IF \$(LHS) == \$(RHS)
26 +@echo "true"
27 .ELSE
28 +@echo "false"
29 .ENDIF
31 EOT
33 output=`eval ${DMAKEPROG} -r -f $file1`
34 result=$?
36 if test "$output" != "true"; then
37 result=1
38 fi
40 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
41 test $result -ne 0 && echo "Failure!"
42 exit $result