Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / dmake / tests / targets-9
blobb82d3796750d4a0427e36c804cd867104bf7f789
1 #!/bin/sh
3 # 14.06.2006 Volker Quetschke
4 # Prior to dmake 4.5 only one %-target per target-definition worked reliably.
5 # (issue 48087)
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 # Check that we warn.
18 cat > $file1 <<EOT
19 SHELL*:=/bin/sh
20 SHELLFLAGS*:=-ce
22 %.xx %.rr : %.yy 'a' 'b' ; touch $@
24 dummy :
25 @+echo "A target"
27 EOT
29 output1=`eval ${DMAKEPROG} -r -f $file1 2>&1 `
30 result1=$?
32 if echo $output1 | grep 'Warning: -- Prior to dmake 4.5 only one' > /dev/null 2>&1 ; then
33 dummy=1
34 # OK
35 else
36 echo "Test 1: Wrong result: $output1"
37 echo
38 result1=1
41 if test $result1 -eq 0 ; then
42 echo "Success - Cleaning up"
43 rm -rf $tmpfiles
44 result=0
45 else
46 echo "Failure!"
47 result=1
49 exit $result