Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / dmake / tests / misc-3
blobacd7ce4822b48c28e76c4a68b18dd5c41f3dbc6f
1 #!/bin/sh
3 # 17.09.2005 Volker Quetschke
4 # Test for line continuation in comments.
5 # (issue 49461)
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 AAA:=aaa
23 # A continued comment line followed/ended by an empty line \
25 AAA+=bbb
27 all:
28 +@echo \$(AAA)
30 EOT
32 output=`eval ${DMAKEPROG} -r -f $file1`
33 result=$?
35 # The space between aaa and bbb comes from the +=
36 if test "$output" != "aaa bbb"; then
37 echo "Wrong result"
38 result=1
42 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
43 test $result -ne 0 && echo "Failure!"
44 exit $result