Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / dmake / tests / misc-5
blob5c458482d7c707b9031bca8be4f5da81fce9ad42
1 #!/bin/sh
3 # 06.10.2005 Volker Quetschke
4 # Test if infered makefile generation works.
5 # (issue 54938)
7 : ${DMAKEPROG:=dmake}
8 file1="mymakefile.mk"
9 file2="incfile.mk"
10 file3="incfiledepend"
11 tmpfiles="$file1 $file2 $file3"
13 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
15 # Remove files from prior failed run
16 rm -rf $tmpfiles
18 # Remember to quote variables in generated makefiles( $ -> \$ ).
19 cat > $file1 <<EOT
20 # Verify that makefile generation is finished when using it
21 SHELL*:=/bin/sh
22 SHELLFLAGS*:=-ce
24 incfile.mk : incfiledepend
25 +@echo AA:=123 > \$@
27 incfiledepend :
28 +@sleep 1
29 +@echo 1234 > \$@
31 .INCLUDE : incfile.mk
33 all :
34 +@echo aa:\$(AA):bb
35 EOT
37 output=`eval ${DMAKEPROG} -r -P2 -f $file1 all`
38 result=$?
40 # The space between aaa and bbb comes from the +=
41 if test "$output" != "aa:123:bb"; then
42 echo "Wrong result"
43 result=1
47 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
48 test $result -ne 0 && echo "Failure!"
49 exit $result