Update ooo320-m1
[ooovba.git] / dmake / tests / targets-18
blob0e75ddb0f55e9ba3b3ee56e8ece77ae829b71228
1 #!/bin/sh
3 # 21.06.2007 Volker Quetschke
4 # Check that OOODMAKEMODE can switches of the ./foo to foo normalization.
5 # (issue 74007)
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 .IMPORT : OOODMAKEMODE
23 # See if OOODMAKEMODE works
24 ./all :
25 @echo X\$@Y
27 EOT
30 output1=`eval OOODMAKEMODE="" ${DMAKEPROG} -rf $file1 2>&1 `
31 result1=$?
32 if test $result1 -ne 0 -o "$output1" != "XallY"; then
33 echo "Test 1: Wrong result: $output1"
34 result1=1
38 output2=`eval OOODMAKEMODE=y ${DMAKEPROG} -rf $file1 2>&1 `
39 result2=$?
40 if test $result2 -ne 0 -o "$output2" != "X./allY"; then
41 echo "Test 2: Wrong result: $output2"
42 result2=1
45 if test $result1 -eq 0 -a $result2 -eq 0; then
46 echo "Success - Cleaning up"
47 rm -rf $tmpfiles
48 exit 0
49 else
50 echo "Failure!"
51 exit 1