Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / dmake / tests / misc-12
blobf8e4f7a1dcdb26448fcadbfa07de78343376a00d
1 #!/bin/sh
3 # 22.06.2006 Volker Quetschke
4 # Conditional expressions failed before with line continuations.
5 # (issue 66659)
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 # Also quote line continuations ( \<nl> -> \\<nl> ).
18 cat > $file1 <<EOT
19 SHELL*:=/bin/sh
20 SHELLFLAGS*:=-ce
22 all:
23 .IF "a" == "a" && \\
24 "b" == "b"
25 @+echo OK
26 .ELSE
27 @+echo WRONG
28 .ENDIF
29 EOT
31 output=`eval ${DMAKEPROG} -r -f $file1`
32 result=$?
34 if test "$output" != "OK"; then
35 result=1
36 fi
38 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
39 test $result -ne 0 && echo "Failure!"
40 exit $result