Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / dmake / tests / misc-8
blob28d27595ab84b49e98ce4e0ae198f33fb0cf2fda
1 #!/bin/sh
3 # 26.02.2006 Volker Quetschke
4 # Test if dmake complains about circular dependencies when using
5 # infered .INCLUDE targets
6 # (issue 62118)
8 : ${DMAKEPROG:=dmake}
9 file1="mfile1.mk"
10 file2="mytarget.dpcc"
11 tmpfiles="$file1 $file2"
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 %.dpcc :
25 @echo making: \$@
26 @+echo AA=123 > \$@
28 .INCLUDE : mytarget.dpcc
30 ALL : mytarget.dpcc
32 EOT
34 output=`eval ${DMAKEPROG} -r -f $file1`
35 result=$?
37 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
38 test $result -ne 0 && echo "Failure! Invalid circular dependency detected."
39 exit $result