merge the formfield patch from ooo-build
[ooovba.git] / dmake / tests / misc-13
blob7493e744b6b64e6eb3d56033e15e2c3743995342
1 #!/bin/sh
3 # 29.09.2006 Volker Quetschke
4 # Check if the directory cache can be made case insensitive
5 # (issue 69814)
7 : ${DMAKEPROG:=dmake}
8 file1="mfile1.mk"
9 file2="TeSt.target"
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 echo "Something" > $file2
19 # Remember to quote variables in generated makefiles ( $ -> \$ ).
20 # Also quote line continuations ( \<nl> -> \\<nl> ).
21 cat > $file1 <<EOT
22 SHELL*:=/bin/sh
23 SHELLFLAGS*:=-ce
25 .DIRCACHE=yes
27 # Only test the directory cache for case insensitivity if the FS is also
28 # case insensitive.
29 .IF "\$(.DIRCACHERESPCASE)"!="y"
30 test.target :
31 @echo "Building \$@"
33 .ELSE
34 TeSt.target :
35 @echo "Building \$@"
37 .ENDIF
39 EOT
41 output=`eval ${DMAKEPROG} -vm -r -f $file1`
42 result=$?
44 if echo "$output" | grep -v ".target' is up to date" > /dev/null 2>&1 ; then
45 echo "Wrong result: ${output}"
46 result=1
47 fi
49 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
50 test $result -ne 0 && echo "Failure!"
51 exit $result