update dev300-m58
[ooovba.git] / dmake / tests / targets-30
blob31e2e9712504558b04de92f5a340d0adf588abd1
1 #!/bin/sh
3 # 05.02.2008 Volker Quetschke
4 # Check that OOODMAKEMODE=y does not normalize ./../foo.
5 # (issue 84800)
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 cat > $file1 <<EOT
18 SHELL*:=/bin/sh
19 SHELLFLAGS*:=-ce
21 OOODMAKEMODE:=y
23 # See if OOODMAKEMODE keeps ./../all
24 ./../all :
25 @echo X\$@Y
27 EOT
30 output1=`eval ${DMAKEPROG} -rf $file1 2>&1 `
31 result1=$?
32 if test $result1 -ne 0 -o "$output1" != "X./../allY"; then
33 echo "Test 1: Wrong result: $output1"
34 result1=1
36 # Remember to quote variables in generated makefiles( $ -> \$ ).
37 cat > $file1 <<EOT
38 SHELL*:=/bin/sh
39 SHELLFLAGS*:=-ce
41 OOODMAKEMODE:=
43 # See if OOODMAKEMODE= removes the leading .
44 ./../all :
45 @echo X\$@Y
47 EOT
50 output2=`eval ${DMAKEPROG} -rf $file1 2>&1 `
51 result2=$?
52 if test $result2 -ne 0 -o "$output2" != "X../allY"; then
53 echo "Test 2: Wrong result: $output2"
54 result2=1
57 if test $result1 -eq 0 -a $result2 -eq 0 ; then
58 echo "Success - Cleaning up"
59 rm -rf $tmpfiles
60 exit 0
61 else
62 echo "Failure!"
63 exit 1