merge the formfield patch from ooo-build
[ooovba.git] / dmake / tests / targets-14
blob7e1fae45f8d4084a8c8fef373006437a0f073483
1 #!/bin/sh
3 # 16.07.2006 Volker Quetschke
4 # Check that evaluating an empty macro and thereby initializing it does not
5 # prevent the *= and *:= operator from assigning a new value.
6 # (issue 67166)
8 : ${DMAKEPROG:=dmake}
9 file1="mfile1.mk"
10 tmpfiles="$file1"
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 # Remember to quote variables in generated makefiles( $ -> \$ ).
18 # Check that we set AAA to set_AAA.
19 cat > $file1 <<EOT
20 SHELL*:=/bin/sh
21 SHELLFLAGS*:=-ce
23 .IF \$(AAA)!=321
24 BLA=bla
25 .ENDIF
27 AAA*=set_AAA
29 all:
30 @+echo "\$(AAA)"
31 EOT
33 output1=`eval ${DMAKEPROG} -rf $file1 2>&1 `
34 result1=$?
36 if test $output1 = "set_AAA" ; then
37 dummy=1
38 # OK
39 else
40 echo "Test 1: Wrong result: $output1"
41 echo
42 result1=1
45 if test $result1 -eq 0 ; then
46 echo "Success - Cleaning up"
47 rm -rf $tmpfiles
48 result=0
49 else
50 echo "Failure! Unexpected result."
51 result=1
53 exit $result