Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / dmake / tests / misc-15
bloba213c2d885af7dc76df5e978d7b8df6f804e0dca
1 #!/bin/sh
3 # 09.11.2006 Volker Quetschke
4 # Check DOS style paths and directory caching with cygwin dmake or just
5 # normal paths with other versions.
6 # issue 69742, 69943
8 : ${DMAKEPROG:=dmake}
9 file1="mfile1.mk"
10 file2="target.abc"
11 tmpfiles="$file1 $file2"
13 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
15 # Remove files from prior failed run
16 rm -rf $tmpfiles
18 echo "Something" > $file2
20 # Remember to quote variables in generated makefiles ( $ -> \$ ).
21 # Also quote line continuations ( \<nl> -> \\<nl> ).
22 cat > $file1 <<EOT
23 SHELL*:=/bin/sh
24 SHELLFLAGS*:=-ce
26 .DIRCACHE=yes
28 # Test if .SETDIR works with drive letters
29 .IF "\$(subst,Cygwin, \$(shell @uname))"!="\$(shell @uname)"
30 MYTARGET:=\$(shell @+cygpath -d "\$(PWD)")\target.abc
31 .ELSE
32 MYTARGET:=\$(PWD)/target.abc
33 .ENDIF
35 "\$(MYTARGET)" :
36 @echo "Building \$@ - \$(MYTARGET)"
38 EOT
40 output=`eval ${DMAKEPROG} -vm -r -f $file1`
41 result=$?
43 if echo "$output" | grep "target.abc' is up to date" > /dev/null 2>&1 ; then
44 # OK
45 dummy=1
46 else
47 echo "Wrong result: ${output}"
48 result=1
49 fi
51 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
52 test $result -ne 0 && echo "Failure!"
53 exit $result