Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / dmake / tests / recipes-3
bloba4e4a24b6653e93f19ec18ebb196f08686d5ccb5
1 #!/bin/sh
3 # 29.07.2006 Volker Quetschke
4 # Test builtin commands.
5 # (issue 67589)
7 : ${DMAKEPROG:=dmake}
8 file1="mymakefile.mk"
9 tmpfiles="$file1"
11 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
13 trap 'rm -rf $tmpfiles' 1 2 3 15
15 # Remember to quote variables in generated makefiles( $ -> \$ ).
16 cat > $file1 <<EOT
17 # Test noop and empty lines
18 SHELL:=/bin/sh
19 SHELLFLAGS:=-ce
21 all :
22 \$(NULL)
23 +\$(NULL)
24 @noop bla bla \$(assign NOSHELL:=ABC)
25 @+noop bla bla \$(assign WITHSHELL:=DEF)
26 @echo \$(NOSHELL)\$(WITHSHELL)
28 EOT
30 output=`eval ${DMAKEPROG} -r -f $file1`
31 result=$?
32 if test "$output" != "ABCDEF"; then
33 echo "Wrong result: $output"
34 result=1
38 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
39 test $result -ne 0 && echo "Failure!"
40 exit $result