Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / dmake / tests / misc-17
blob158b1157575242b6150cb0d320ef635682f7bafa
1 #!/bin/sh
3 # 19.11.2006 Volker Quetschke
4 # Check that a global .SEQUENTIAL attribute enforces MAXPROCESS=1.
5 # (issue 71704)
7 : ${DMAKEPROG:=dmake}
8 file1="mfile1.mk"
9 file2="my.inc"
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 # Remember to quote variables in generated makefiles( $ -> \$ ).
18 cat > $file1 <<EOT
19 SHELL=/bin/sh
20 SHELLFLAGS=-c
22 my.inc :
23 @+echo "MYMAXPROCESS!:=\$(MAXPROCESS)" > my.inc
25 .INCLUDE : my.inc
27 all:
28 @+echo "MYMAXPROCESS:\$(MYMAXPROCESS):"
30 EOT
32 output=`eval ${DMAKEPROG} -S -P2 -rf $file1 all`
33 result=$?
35 if test "$output" != "MYMAXPROCESS:1:"; then
36 echo "Wrong result: $output - expecting: MYMAXPROCESS:1:"
37 result=1
38 fi
40 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
41 test $result -ne 0 && echo "Failure!"
42 exit $result