3 # 24.07.2007 Volker Quetschke
4 # Test the :b :d :e :f macro extensions.
11 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
13 # Remove files from prior failed run
16 # Remember to quote variables in generated makefiles( $ -> \$ ).
17 # Test 1 - Test if :f works.
24 MACRO:=/tmp/yyy.ext "/tmp/a b/xxx.ext"
30 output1
=`eval ${DMAKEPROG} -r -f $file1`
32 if test "$output1" != "f:yyy.ext \"xxx.ext\":"; then
33 echo "Subtest 1: Wrong result: $output1"
44 MACRO:=/tmp/yyy.ext "/tmp/a b/xxx.ext"
51 output2
=`eval ${DMAKEPROG} -r -f $file1`
53 if test "$output2" != "d:/tmp/ \"/tmp/a b/\":"; then
54 echo "Subtest 2: Wrong result: $output2"
66 MACRO:=/tmp/yyy.ext "/tmp/a b/xxx.ext"
73 output3
=`eval ${DMAKEPROG} -r -f $file1`
75 if test "$output3" != "e:.ext \".ext\":"; then
76 echo "Subtest 3: Wrong result: $output3"
88 MACRO:=/tmp/yyy.ext "/tmp/a b/xxx.ext"
95 output4
=`eval ${DMAKEPROG} -r -f $file1`
97 if test "$output4" != "b:yyy \"xxx\":"; then
98 echo "Subtest 4: Wrong result: $output4"
110 MACRO:=/tmp/yyy.ext "/tmp/a b/xxx.ext"
113 @echo de:\$(MACRO:de):
117 output5
=`eval ${DMAKEPROG} -r -f $file1`
119 if test "$output5" != "de:/tmp/.ext \"/tmp/a b/.ext\":"; then
120 echo "Subtest 5: Wrong result: $output5"
132 MACROd:=/tmp/yyy "/tmp/a b/xxx"
135 @echo e:\$(MACROd:e):
139 output6
=`eval ${DMAKEPROG} -r -f $file1`
141 if test "$output6" != "e::"; then
142 echo "Subtest 6: Wrong result: $output6"
149 if test $result1 -eq 0 -a $result2 -eq 0 \
150 -a $result3 -eq 0 -a $result4 -eq 0 \
151 -a $result5 -eq 0 -a $result6 -eq 0 ; then
152 echo "Success - Cleaning up" && rm -f ${tmpfiles}