update dev300-m58
[ooovba.git] / dmake / tests / function_macros-4
blobeef22e334ab946adeca27b794633b89339994298
1 #!/bin/sh
3 # 04.09.2005 Volker Quetschke
4 # Tests $(shell ..) if function macro is executed after previous recipe lines
5 # when using two concurrend (or more) processes.
6 # (issue 53148)
8 : ${DMAKEPROG:=dmake}
9 file1="makefile.mk"
10 file2="stdout.txt"
11 tmpfiles="$file1 $file2"
13 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
15 trap 'rm -rf $tmpfiles' 1 2 3 15
17 # Remember to quote variables in generated makefiles( $ -> \$ ).
18 cat > $file1 <<EOT
19 # Testing continuation char in recipes
20 SHELL*:=/bin/sh
21 SHELLFLAGS*:=-ce
23 aaa :
24 +echo b0
25 +echo b1
26 +echo teststring > $file2
27 +echo A\$(shell cat $file2)A
28 EOT
30 ${DMAKEPROG} -P2 -r -f $file1
31 result=$?
33 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
34 test $result -ne 0 && echo "Failure!"
35 exit $result