Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / dmake / tests / misc-10
blob42d2bea5bfbaf244c788e37779c114b6114458ff
1 #!/bin/sh
3 # 10.05.2006 Volker Quetschke
4 # A comparison with the empty string crashes dmake.
5 # (issue 65182/65281)
7 : ${DMAKEPROG:=dmake}
8 file1="mfile1.mk"
9 tmpfiles="$file1"
11 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
13 # Remove files from prior failed run
14 rm -rf $tmpfiles
16 # Remember to quote variables in generated makefiles( $ -> \$ ).
17 cat > $file1 <<EOT
18 SHELL*:=/bin/sh
19 SHELLFLAGS*:=-ce
21 MYVAR=
23 all:
24 .IF \$(MYVAR) >= "122"
25 +@echo "true"
26 .ELSE
27 +@echo "false"
28 .ENDIF
30 EOT
32 output=`eval ${DMAKEPROG} -r -f $file1`
33 result=$?
35 if test "$output" != "false"; then
36 result=1
37 fi
39 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
40 test $result -ne 0 && echo "Failure!"
41 exit $result