update dev300-m58
[ooovba.git] / dmake / tests / misc-16
blob2e234d3d15a17fe9159fb298cda8e0716b6d26ac
1 #!/bin/sh
3 # 17.11.2006 Volker Quetschke
4 # Check that parallel builds $(shell ...) only waits its own target and
5 # not for all previous recipe lines.
6 # (issue 61856)
8 : ${DMAKEPROG:=dmake}
9 file1="mfile1.mk"
10 file2="mytarget.dpcc"
11 tmpfiles="$file1 $file2"
13 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
15 # Remove files from prior failed run
16 rm -rf $tmpfiles
18 # Remember to quote variables in generated makefiles( $ -> \$ ).
19 cat > $file1 <<EOT
20 SHELL*:=/bin/sh
21 SHELLFLAGS*:=-ce
23 all : all1 all2
24 @+echo all
26 all1 :
27 @+printf "1"
28 @+sleep 2
29 @+printf "4"
31 all2 :
32 @+sleep 1
33 @+printf "2"
34 @+printf "\$(shell @+echo "3")"
36 EOT
38 output=`eval ${DMAKEPROG} -r -P2 -f $file1`
39 result=$?
41 if test "$output" != "1234all"; then
42 echo "Wrong result: $output - expecting: 1234all"
43 result=1
44 fi
46 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
47 test $result -ne 0 && echo "Failure!"
48 exit $result