office-gobmx/dmake/tests/misc-8
Ivo Hinkelmann aa057c097f INTEGRATION: CWS dmake45 (1.2.2); FILE MERGED
2006/06/22 20:45:44 vq 1.2.2.1: #i66650# Make dmake testsuite more portable. (Usable with Solaris.)
Patch by hjs.
2006-06-29 10:29:33 +00:00

39 lines
877 B
Bash
Executable file

#!/bin/sh
# 26.02.2006 Volker Quetschke
# Test if dmake complains about circular dependencies when using
# infered .INCLUDE targets
# (issue 62118)
: ${DMAKEPROG:=dmake}
file1="mfile1.mk"
file2="mytarget.dpcc"
tmpfiles="$file1 $file2"
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( $ -> \$ ).
cat > $file1 <<EOT
# Verify that makefile generation is finished when using it
SHELL*:=/bin/sh
SHELLFLAGS*:=-ce
%.dpcc :
@echo making: \$@
@+echo AA=123 > \$@
.INCLUDE : mytarget.dpcc
ALL : mytarget.dpcc
EOT
output=`eval ${DMAKEPROG} -r -f $file1`
result=$?
test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
test $result -ne 0 && echo "Failure! Invalid circular dependency detected."
exit $result