update dev300-m58
[ooovba.git] / dmake / tests / function_macros-6
blobce22d9c6e9137265a3af2d331509ac9a604ed5e1
1 #!/bin/sh
3 # 22.07.2006 Volker Quetschke
4 # Verifies that $(nil expression) expand expression but returns "".
5 # (issue 67585)
7 : ${DMAKEPROG:=dmake}
8 file1="makefile.mk"
9 tmpfiles="$file1"
11 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
13 trap 'rm -rf $tmpfiles' 1 2 3 15
15 # Remember to quote variables in generated makefiles( $ -> \$ ).
16 cat > $file1 <<EOT
17 # Testing nil function macro
18 SHELL*:=/bin/sh
19 SHELLFLAGS*:=-ce
21 all : dep
22 @+echo "X\$(AAA)X"
24 dep :
25 \$(nil \$(assign AAA := OK))
27 EOT
29 output1=`eval ${DMAKEPROG} -rf $file1 2>&1 `
30 result1=$?
32 if test $output1 = "XOKX" ; then
33 dummy=1
34 # OK
35 else
36 echo "Wrong result: $output1"
37 result1=1
40 test $result1 -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
41 test $result1 -ne 0 && echo "Failure!"
42 exit $result1