Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / dmake / tests / misc-7
blob285f44d50e8126414c590d65b04443f9e68c89c0
1 #!/bin/sh
3 # 06.02.2006 Volker Quetschke
4 # Verify that the .SETDIR attribute works separately from the target
5 # definition. (issue 61714)
7 : ${DMAKEPROG:=dmake}
8 file1="mfile1.mk"
9 file2="subdir"
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 # Remember to quote variables in generated makefiles( $ -> \$ ).
18 cat > $file1 <<EOT
19 SHELL*:=/bin/sh
20 SHELLFLAGS*:=-ce
22 .SETDIR=subdir : all
24 all :
25 @+echo ":\$(PWD:f):"
27 EOT
29 mkdir -p "$file2"
31 output1=`eval ${DMAKEPROG} -r -f $file1`
32 result1=$?
34 if test "$output1" != ":$file2:"; then
35 echo "Wrong result - use of .SETDIR was not successful."
36 result1=1
37 fi
39 if test $result1 -eq 0; then
40 echo "Success - Cleaning up"
41 rm -rf ${tmpfiles}
42 result=0
43 else
44 echo "Failure!"
45 result=1
47 exit $result