Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / dmake / tests / targets-22
blob14474f09792e279bab44264135c1902be4cf7fff
1 #!/bin/sh
3 # 12.07.2007 Volker Quetschke
4 # Check that intermediate targets are marked removable.
5 # (issue 80143)
7 : ${DMAKEPROG:=dmake}
8 file1="mfile1.mk"
9 file2="aaa.aaa"
10 tmpfiles="$file1 $file2"
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 # Create test environment
18 touch aaa.aaa
20 # Remember to quote variables in generated makefiles( $ -> \$ ).
21 cat > $file1 <<EOT
22 SHELL*:=/bin/sh
23 SHELLFLAGS*:=-ce
25 .REMOVE : ; @echo remove \$<
27 %.a : %.b
28 @noop $@
30 %.b :
31 @noop $@
33 all : xx.a
34 @noop all
36 EOT
38 output1=`eval ${DMAKEPROG} -rf $file1 2>&1 `
39 result1=$?
41 if test "$output1" != "remove xx.b"; then
42 echo "Wrong result: $output1"
43 result1=1
44 else
45 echo "OK"
46 fi
48 if test $result1 -eq 0 ; then
49 echo "Success - Cleaning up"
50 rm -rf $tmpfiles
51 exit
52 else
53 echo "Failure!"
54 exit 1