diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-04-20 11:17:31 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-04-20 11:17:31 +0000 |
commit | c39ca2825111eac7104d0eb0ced1e31550ec995c (patch) | |
tree | be70d6388ddf78be202f4e70df2a849b21dbd176 /dmake/tests/misc-9 | |
parent | 583861934668c14cee89609ff709f0024ee70faf (diff) |
INTEGRATION: CWS dmake43p01 (1.1.2); FILE ADDED
2006/03/02 03:37:17 vq 1.1.2.1: #i61969# Commit testcase for this issue.
Diffstat (limited to 'dmake/tests/misc-9')
-rwxr-xr-x | dmake/tests/misc-9 | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/dmake/tests/misc-9 b/dmake/tests/misc-9 new file mode 100755 index 000000000000..546dbd6915a8 --- /dev/null +++ b/dmake/tests/misc-9 @@ -0,0 +1,52 @@ +#!/bin/sh + +# 01.03.2006 Volker Quetschke +# If a dependency is added to a target after it is already build as an +# indered .INCLUDE makefile the new dependency can be lost in parallel +# builds. +# (issue 61969) + +: ${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 +SHELL*:=/bin/sh +SHELLFLAGS*:=-ce + +%.dpcc : +# The following line adds a dependency to %.obj when the %.dpcc is included + @+echo \$@ : \$(@:b).obj > \$@ + +# This has to be build if mytarget.dpcc is included and is requested +# as a target +# Adding the wait makes sure that the unpatched dmake is ended before the +# next recipe line is started, therefore loosing it. +%.obj : + @sleep 1 + @echo making: \$@ + +.INCLUDE : mytarget.dpcc + +# Make this the main target +mytarget.dpcc : + +EOT + +output=$(${DMAKEPROG} -r -P2 -f $file1) +result=$? + +if test "$output" != "making: mytarget.obj"; then + result=1 +fi + +test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles} +test $result -ne 0 && echo "Failure! Recipe line got lost." +exit $result |