Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / dmake / tests / targets-23
blobee670d496b34e828fd5e799fbc0f834d68baec6f
1 #!/bin/sh
3 # 03.08.2007 Volker Quetschke
4 # Check that a %-target without prereq has precedence over one with
5 # prerequisite.
6 # (issue 80144)
8 : ${DMAKEPROG:=dmake}
9 file1="mfile1.mk"
10 file2="aaa.aaa"
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 # Create test environment
19 touch aaa.aaa
21 # Remember to quote variables in generated makefiles( $ -> \$ ).
22 cat > $file1 <<EOT
23 SHELL*:=/bin/sh
24 SHELLFLAGS*:=-ce
26 .REMOVE : ; @echo remove \$<
28 %.a : %.b
29 @echo Wrong choice - $@
31 %.a :
32 @echo Right choice
34 all : xx.a
35 @noop all
37 EOT
39 output1=`eval ${DMAKEPROG} -rf $file1 2>&1 `
40 result1=$?
42 if test "$output1" != "Right choice"; then
43 echo "Wrong result: $output1"
44 result1=1
45 else
46 echo "OK"
47 fi
49 if test $result1 -eq 0 ; then
50 echo "Success - Cleaning up"
51 rm -rf $tmpfiles
52 exit
53 else
54 echo "Failure!"
55 exit 1