update dev300-m58
[ooovba.git] / dmake / tests / recipes-2
blob3e31fa1eb619bbef0813846ff5ff6ce5b0e7b453
1 #!/bin/sh
3 # 24.07.2006 Volker Quetschke
4 # Simple tests for group recipes.
5 # (issue 64583)
7 : ${DMAKEPROG:=dmake}
8 file1="mymakefile.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 # Test group recipes
18 SHELL:=/bin/sh
19 SHELLFLAGS:=-ce
20 GROUPSHELL:=/bin/sh
21 GROUPSUFFIX:=.sh
23 all :
25 printf "line1"
26 printf "line2"
28 EOT
30 output=`eval ${DMAKEPROG} -r -f $file1`
31 result=$?
32 if test "$output" != "line1line2"; then
33 echo "Wrong result: $output"
34 result=1
38 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
39 test $result -ne 0 && echo "Failure!"
40 exit $result