update dev300-m58
[ooovba.git] / dmake / tests / targets-7
blob7fb091bd5bdf75b102b2b72845821f01e25b6cbf
1 #!/bin/sh
3 # 13.06.2006 Volker Quetschke
4 # Check that `%.a %.b :| %.x %.y 'Z' ; recipe` rules are handled correctly.
5 # (issues 48087 and 65122)
7 : ${DMAKEPROG:=dmake}
8 file1="mfile1.mk"
9 tmpfiles="$file1"
11 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
13 # Remove files from prior failed run
14 rm -rf $tmpfiles
16 # Remember to quote variables in generated makefiles( $ -> \$ ).
17 # Expect dummy, all.pp and all.xx to be build
18 # that gets build.
19 cat > $file1 <<EOT
20 SHELL*:=/bin/sh
21 SHELLFLAGS*:=-ce
23 %.xx %.rr :| %.yy %.pp 'dummy' ; @+printf "\$@"
25 %.pp :
26 @sleep 1
27 @+printf "\$@"
29 dummy :
30 @+printf "\$@"
32 EOT
34 output1=`eval ${DMAKEPROG} -r -f $file1 all.xx 2>&1 `
35 result1=$?
37 if echo $output1 | grep 'dummyall.ppall.xx' > /dev/null 2>&1 ; then
38 dummy=1
39 # OK
40 else
41 echo "Test 1: Wrong result: $output1"
42 echo
43 result1=1
46 if test $result1 -eq 0 ; then
47 echo "Success - Cleaning up"
48 rm -rf $tmpfiles
49 result=0
50 else
51 echo "Failure!"
52 result=1
54 exit $result