3 # 16.09.2007 Volker Quetschke
4 # Check that inferred makefiles for .INCLUDE do not disturb the dependency
13 tmpfiles
="$file1 $file2 $file3 $file4"
15 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
17 # Remove files from prior failed run
20 # Remember to quote variables in generated makefiles( $ -> \$ ).
21 # Test 1 - from testcase t_81296_5.mk
26 # Test that my.c is build when my.foo is newer.
29 %.obj : %.c ; @+printf "\$@:"
33 %.dpo : %.c ; @+printf "incbuild:\$@:"
37 all : my.obj ; @echo all
39 # If the file exist no inference is done for it.
40 .INCLUDE .IGNORE : my.dpo
42 # When inference was run on the %.dpo with an existing
43 # %.c these rule gets ignored.
44 # local makefile.mk ---
45 %.c : %.foo ; @+printf "\$@:"
50 # Create test environment
55 output1
=`eval ${DMAKEPROG} -rf $file1 2>&1 `
58 if test $result1 = 0 -a "$output1" = "incbuild:my.dpo:my.c:my.obj:all"; then
61 echo "Subtest 1: Wrong result: $output1"
66 # Remove files from prior run
68 # Remember to quote variables in generated makefiles( $ -> \$ ).
69 # Test 2 - from testcase t_81296_6.mk
74 # Test that no circular dependency error is issued:
75 # $ rm -f my.* ; touch my.c ; ./dmake/dmake.exe -rf t_81296_6.mk
78 %.obj : %.c ; @+printf "\$@:"
81 %.dpo : %.c ; @+printf "incbuild:\$@:"
84 all : my.obj ; @echo all
86 # If the file exist no inference is done for it.
87 .INCLUDE .IGNORE : my.dpo
89 %.c : %.foo ; @+printf "\$@:"
92 # This leads to a (wrong) circular dependency error
97 # Create test environment
102 output2
=`eval ${DMAKEPROG} -rf $file1 2>&1 `
105 if test $result2 = 0 -a "$output2" = "incbuild:my.dpo:my.c:my.obj:all"; then
108 echo "Subtest 2: Wrong result: $output2"
114 if test $result1 -eq 0 -a $result2 -eq 0 ; then
115 echo "Success - Cleaning up"