3 # 23.03.2007 Volker Quetschke
4 # Test .WINPATH attribute (A cygwin only attribute that is ignored
12 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
14 # Remove files from prior failed run
17 # Remember to quote variables in generated makefiles( $ -> \$ ).
18 # Test 1 - Test if .WINPATH is accepted as global attribute
30 output1
=`eval ${DMAKEPROG} -r -f $file1`
32 if test "$output1" != "OK1"; then
33 echo "Subtest 1: Wrong result: $output1"
39 # Test 2 - Test if .WINPATH is accepted as local attribute
49 output2
=`eval ${DMAKEPROG} -r -f $file1`
51 if test "$output2" != "OK2"; then
52 echo "Subtest 2: Wrong result: $output2"
59 # Test 3 - Test if $@ and $* are DOSified.
64 /tmp/blah.xx .WINPATH :
65 @echo at:\$@:star:\$*:
69 if test x
`uname -o 2> /dev/null` = "xCygwin"; then
70 output3
=`eval ${DMAKEPROG} -r -f $file1`
72 if test "$output3" != "at:`cygpath -m /tmp/blah.xx`:star:`cygpath -m /tmp/blah`:"; then
73 echo "Subtest : Wrong result: $output3"
79 echo "Subtest 3 ignored for non cygwin environment"
84 # Test 4 - Test if $(PWD), $(MAKEDIR) are DOSified.
89 all .WINPATH .SETDIR=/tmp :
90 @echo :\$(PWD):\$(MAKEDIR):
94 if test x
`uname -o 2> /dev/null` = "xCygwin"; then
95 output4
=`eval ${DMAKEPROG} -r -f $file1`
98 if test "$output4" != ":`cygpath -m /tmp`:`cygpath -m $mypwd`:"; then
99 echo "Subtest : Wrong result: $output4"
105 echo "Subtest 4 ignored for non cygwin environment"
110 # Test 5 - Test if $(TMD) is DOSified (if it is an absolute path).
115 all .WINPATH .SETDIR=/ :
116 @echo :\$(PWD):\$(TMD):
120 if test x
`uname -o 2> /dev/null` = "xCygwin"; then
121 output5
=`eval ${DMAKEPROG} -r -f $file1`
124 if test "$output5" != ":`cygpath -m /`:`cygpath -m $mypwd`:"; then
125 echo "Subtest : Wrong result: $output5"
131 echo "Subtest 5 ignored for non cygwin environment"
136 # Test 6 - Test if .WINPATH changes $@ in conditional macro.
141 /tmp/all.bla ?= QQQ=\$@
142 /tmp/all.bla .WINPATH :
146 if test x
`uname -o 2> /dev/null` = "xCygwin"; then
147 output6
=`eval ${DMAKEPROG} -r -f $file1`
149 if test "$output6" != ":`cygpath -m /tmp/all.bla`:"; then
150 echo "Subtest : Wrong result: $output6"
156 echo "Subtest 6 ignored for non cygwin environment"
161 if test $result1 -eq 0 -a $result2 -eq 0 \
162 -a $result3 -eq 0 -a $result4 -eq 0 \
163 -a $result5 -eq 0 -a $result6 -eq 0; then
164 echo "Success - Cleaning up" && rm -f ${tmpfiles}