Update ooo320-m1
[ooovba.git] / dmake / tests / targets-5
blob0e83ca43107c82fd81e4747b7bf188b4467fa832
1 #!/bin/sh
3 # 13.06.2006 Volker Quetschke
4 # Error out if AUGMAKE meta and normal targets occur in the same rule
5 # definition.
6 # (issue 66083)
8 : ${DMAKEPROG:=dmake}
9 file1="mfile1.mk"
10 tmpfiles="$file1"
12 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
14 # Remove files from prior failed run
15 rm -rf $tmpfiles
17 # Remember to quote variables in generated makefiles( $ -> \$ ).
18 # Testcase 1 - Check that warning is issued if .<suffix> targets are ignored
19 cat > $file1 <<EOT
20 SHELL*:=/bin/sh
21 SHELLFLAGS*:=-ce
23 .NIX.NUX aaa : ; @+echo "Normal and meta target together"
25 something :
26 @+echo "A target."
28 EOT
30 output1=`eval ${DMAKEPROG} -r -f $file1 2>&1 `
31 result1=$?
33 if echo $output1 | grep 'Error: -- A non AUGMAKE meta target must' > /dev/null 2>&1 ; then
34 dummy=1
35 # OK
36 else
37 echo "Test 1: Wrong result: $output1"
38 echo
39 result1=0
42 # Errorcode in $result1 means successfull test
43 if test $result1 -ne 0 ; then
44 echo "Success - Cleaning up"
45 rm -rf $tmpfiles
46 result=0
47 else
48 echo "Failure!"
49 result=1
51 exit $result