diff options
author | Boris Kolpackov <boris@kolpackov.net> | 2005-03-10 09:14:09 +0000 |
---|---|---|
committer | Boris Kolpackov <boris@kolpackov.net> | 2005-03-10 09:14:09 +0000 |
commit | d584d0c1c6945e0b498365e7d17f0fe3cb449d04 (patch) | |
tree | c5cd5fd3fe111b0f84bd62c85ccb2e4f9f32f18d /tests | |
parent | 18251c4633134c704464d7c567d82a110ab820c8 (diff) | |
download | gunmake-d584d0c1c6945e0b498365e7d17f0fe3cb449d04.tar.gz |
Fixed Savannah bug #12267.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ChangeLog | 4 | ||||
-rw-r--r-- | tests/scripts/features/patternrules | 32 |
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 7fa8f86..ae255a2 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2005-03-10 Boris Kolpackov <boris@kolpackov.net> + + * scripts/features/patternrules: Add a test for Savannah bug #12267. + 2005-03-09 Boris Kolpackov <boris@kolpackov.net> * scripts/variables/DEFAULT_TARGET: Add a test for Savannah diff --git a/tests/scripts/features/patternrules b/tests/scripts/features/patternrules index 3202a67..ee29c4e 100644 --- a/tests/scripts/features/patternrules +++ b/tests/scripts/features/patternrules @@ -4,6 +4,12 @@ $description = "Test pattern rules."; $details = ""; +use Cwd; + +$dir = cwd; +$dir =~ s,.*/([^/]+)$,../$1,; + + # TEST #1: Make sure that multiple patterns where the same target # can be built are searched even if the first one fails # to match properly. @@ -63,5 +69,31 @@ foo.in: ; @: foo.out'); +# TEST #3: make sure intermidite files that also happened to be +# prerequisites are not removed (Savannah bug #12267). +# +run_make_test(' +$(dir)/foo.o: + +$(dir)/foo.y: + @echo $@ + +%.c: %.y + touch $@ + +%.o: %.c + @echo $@ + +.PHONY: install +install: $(dir)/foo.c + +', +"dir=$dir", +"$dir/foo.y +touch $dir/foo.c +$dir/foo.o"); + +unlink("$dir/foo.c"); + # This tells the test driver that the perl test script executed properly. 1; |