#!/bin/sh # 05.08.2007 Volker Quetschke # Test the $(shell,expand ..) function macro. # (issue 50092) : ${DMAKEPROG:=dmake} file1="mfile1.mk" tmpfiles="$file1" trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15 # Remove files from prior failed run rm -rf $tmpfiles # Remember to quote variables in generated makefiles( $ -> \$ ). # Test 1 - Test if it works. cat > $file1 < $file1 <&1` result2=$? if echo $output2 | grep 'Error: -- Unknown argument \[XXX\] to shell' > /dev/null 2>&1 ; then echo "Subtest 2: OK" else echo "Subtest 2: Wrong result: $output2" echo result2=0 fi if test $result1 -eq 0 -a $result2 -ne 0 ; then echo "Success - Cleaning up" && rm -f ${tmpfiles} exit else echo "Failure!" exit 1 fi