3 # 26.08.2007 Volker Quetschke
4 # Test OOODMAKEMODE macro.
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
17 # Remember to quote variables in generated makefiles( $ -> \$ ).
18 # Test 1 - Without OOODMAKEMODE set strip leading ./
29 output1
=`eval ${DMAKEPROG} -r -f $file1`
31 if test $result1 = 0 -a "$output1" = "XallY" ; then
35 echo "Subtest 1: Wrong result: $output1"
41 # Remember to quote variables in generated makefiles( $ -> \$ ).
42 # Test 2 - With OOODMAKEMODE=y do not strip leading ./
53 output2
=`eval ${DMAKEPROG} -r -f $file1`
55 if test $result2 = 0 -a "$output2" = "X./allY" ; then
59 echo "Subtest 2: Wrong result: $output2"
65 # Remember to quote variables in generated makefiles( $ -> \$ ).
66 # Test 3 - Test OOODMAKEMODE from environment.
71 .IMPORT : OOODMAKEMODE
77 output3
=`eval OOODMAKEMODE=y ${DMAKEPROG} -r -f $file1`
79 if test $result3 = 0 -a "$output3" = "X./allY" ; then
83 echo "Subtest 3: Wrong result: $output3"
89 # Remember to quote variables in generated makefiles( $ -> \$ ).
90 # Test 4 - With OOODMAKEMODE= leading ./
101 output4
=`eval ${DMAKEPROG} -r -f $file1`
103 if test $result4 = 0 -a "$output4" = "XallY" ; then
107 echo "Subtest 4: Wrong result: $output4"
113 # Remember to quote variables in generated makefiles( $ -> \$ ).
114 # Test 5 - Import from environment / targets from command line.
124 .IMPORT : OOODMAKEMODE
127 output5
=`eval DMAKEROOT=. OOODMAKEMODE=y ${DMAKEPROG} -f $file1 ./mytarget`
129 if test $result5 = 0 -a "$output5" = "X./mytargetY" ; then
133 echo "Subtest 5: Wrong result: $output5"
139 if test $result1 -eq 0 -a $result2 -eq 0 \
140 -a $result3 -eq 0 -a $result4 -eq 0 \
141 -a $result5 -eq 0 ; then
142 echo "Success - Cleaning up" && rm -f ${tmpfiles}