Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / dmake / tests / targets-12
blobba9982c4f6be710a992d3d9e0a6a78860fe60532
1 #!/bin/sh
3 # 10.07.2006 Volker Quetschke
4 # Check that dmake warns if it encounters .SUFFIXES
5 # (issue 66567)
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 issue a warning.
18 cat > $file1 <<EOT
19 SHELL*:=/bin/sh
20 SHELLFLAGS*:=-ce
22 .SUFFIXES : .aa .bb
24 all: ; @echo OK
25 EOT
27 output1=`eval ${DMAKEPROG} -vw -rf $file1 2>&1 `
28 result1=$?
30 if echo $output1 | grep 'Warning: -- The .SUFFIXES' > /dev/null 2>&1 ; then
31 dummy=1
32 # OK
33 else
34 echo "Test 1: Wrong result: $output1"
35 echo
36 result1=1
39 if test $result1 -eq 0 ; then
40 echo "Success - Cleaning up"
41 rm -rf $tmpfiles
42 result=0
43 else
44 echo "Failure! dmake failed to issue a warning."
45 result=1
47 exit $result