Update ooo320-m1
[ooovba.git] / dmake / tests / targets-21
blob2aff2285ab69f2539aad4dbfb080db22defc0454
1 #!/bin/sh
3 # 12.07.2007 Volker Quetschke
4 # Another %-target testcase.
5 # (issue 78837)
7 : ${DMAKEPROG:=dmake}
8 file1="mfile1.mk"
9 file2="aaa.aaa"
10 tmpfiles="$file1 $file2"
12 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
14 # Remove files from prior failed run
15 rm -rf $tmpfiles
17 # Create test environment
18 touch aaa.aaa
20 # Remember to quote variables in generated makefiles( $ -> \$ ).
21 cat > $file1 <<EOT
22 SHELL*:=/bin/sh
23 SHELLFLAGS*:=-ce
25 %.aaa : %.bbb
26 @sleep 1
27 @touch \$@
29 %.bbb :
30 @echo building \$@
33 all : aaa.aaa
34 @noop Done
36 EOT
38 output1=`eval ${DMAKEPROG} -rf $file1 2>&1 `
39 result1=$?
41 if test "$output1" != "building aaa.bbb"; then
42 echo "Wrong result: $output1"
43 result1=1
44 else
45 echo "OK"
46 fi
48 if test $result1 -eq 0 ; then
49 echo "Success - Cleaning up"
50 rm -rf $tmpfiles
51 exit
52 else
53 echo "Failure!"
54 exit 1