Update ooo320-m1
[ooovba.git] / dmake / tests / targets-10
blob3f7931242b020e8da5372f64325b6915d15617a8
1 #!/bin/sh
3 # 14.06.2006 Volker Quetschke
4 # If %-targets are defined with more than one (not indirect) prerequisite
5 # only the first is used. This is supposed to be fixed at one point but
6 # currently we issue a warning that it not working (yet).
7 # (issue 48087)
9 : ${DMAKEPROG:=dmake}
10 file1="mfile1.mk"
11 tmpfiles="$file1"
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 # Check that we warn.
20 cat > $file1 <<EOT
21 SHELL*:=/bin/sh
22 SHELLFLAGS*:=-ce
24 %.xx : %.yy %.pp ; touch $@
26 abc.xx : ; echo nix
28 EOT
30 output1=`eval ${DMAKEPROG} -r -f $file1 2>&1 `
31 result1=$?
33 if echo $output1 | grep 'Warning: -- More than one prerequisite' > /dev/null 2>&1 ; then
34 dummy=1
35 # OK
36 else
37 echo "Test 1: Wrong result: $output1"
38 echo
39 result1=1
42 if test $result1 -eq 0 ; then
43 echo "Success - Cleaning up"
44 rm -rf $tmpfiles
45 result=0
46 else
47 echo "Failure!"
48 result=1
50 exit $result