Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / dmake / tests / recipes-1
blobc9108d86198f27866566a7bfdea9305496789f57
1 #!/bin/sh
3 # 01.06.2005 Volker Quetschke
4 # Tests for line continuation in recipes.
5 # (issue 37053)
7 : ${DMAKEPROG:=dmake}
8 file1="mymakefile.mk"
9 tmpfiles="$file1"
11 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
13 trap 'rm -rf $tmpfiles' 1 2 3 15
15 # Remember to quote variables in generated makefiles( $ -> \$ ).
16 cat > $file1 <<EOT
17 # Testing continuation char in recipes
18 SHELL*:=/bin/sh
19 SHELLFLAGS*:=-ce
21 all:
22 +@echo line1\
23 line2
25 EOT
27 output=`eval ${DMAKEPROG} -r -f $file1`
28 result=$?
29 if test "$output" != "line1line2"; then
30 echo "Wrong result"
31 result=1
35 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
36 test $result -ne 0 && echo "Failure!"
37 exit $result