Update ooo320-m1
[ooovba.git] / dmake / tests / function_macros-7
blobe6fc03a3d84a759734715c58a3cf32fed9e52278
1 #!/bin/sh
3 # 24.07.2006 Volker Quetschke
4 # Checks that $(mktmp ...) works.
5 # (issue 64583)
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 mktmp function macro
18 SHELL*:=/bin/sh
19 SHELLFLAGS*:=-ce
21 all :
22 @+cat \$(mktmp WRITTENTODISK)
24 EOT
26 output1=`eval ${DMAKEPROG} -rf $file1 2>&1 `
27 result1=$?
29 if test $output1 = "WRITTENTODISK" ; then
30 dummy=1
31 # OK
32 else
33 echo "Wrong result: $output1"
34 result1=1
37 test $result1 -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
38 test $result1 -ne 0 && echo "Failure!"
39 exit $result1