Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / dmake / tests / targets-25
blobfa95f655bbb180f05c2e3b24f3ca4f9fef16d42a
1 #!/bin/sh
3 # 03.08.2007 Volker Quetschke
4 # Check that the .PRECIOUS attribute works.
5 # (issue 80352)
7 : ${DMAKEPROG:=dmake}
8 file1="mfile1.mk"
9 tmpfiles="$file1 $file2"
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 cat > $file1 <<EOT
18 SHELL*:=/bin/sh
19 SHELLFLAGS*:=-ce
21 .REMOVE : ; @echo remove \$<
23 %.a : %.b
24 @noop Blah
26 %.b .PRECIOUS :
27 @noop xx.b
29 all : xx.a
30 @echo Done
32 EOT
34 output1=`eval ${DMAKEPROG} -rf $file1 2>&1 `
35 result1=$?
37 if test "$output1" != "Done"; then
38 echo "Wrong result: $output1"
39 result1=1
40 else
41 echo "OK"
42 fi
44 if test $result1 -eq 0 ; then
45 echo "Success - Cleaning up"
46 rm -rf $tmpfiles
47 exit
48 else
49 echo "Failure!"
50 exit 1