From 0e6c4f5b0ed4183bbdb8cdce168dcbd1bc9cf182 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 9 Dec 2005 16:46:19 +0000 Subject: Fixed bug #13022 by setting is_target flag on files that this implicit pattern rule also makes. --- tests/scripts/features/patternrules | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'tests/scripts/features/patternrules') diff --git a/tests/scripts/features/patternrules b/tests/scripts/features/patternrules index 1753d4d..90525ae 100644 --- a/tests/scripts/features/patternrules +++ b/tests/scripts/features/patternrules @@ -115,5 +115,35 @@ $(dir)/foo.bar: unlink("$dir/foo.bar"); + +# TEST #5: make sure targets of a macthed implicit pattern rule never +# never considered intermediate (Savannah bug #13022). +# +run_make_test(' +.PHONY: all +all: foo.c foo.o + +%.h %.c: %.in + touch $*.h + touch $*.c + +%.o: %.c %.h + echo $+ >$@ + +%.o: %.c + @echo wrong rule + +foo.in: + touch $@ + +', +'', +'touch foo.in +touch foo.h +touch foo.c +echo foo.c foo.h >foo.o'); + +unlink('foo.in', 'foo.h', 'foo.c', 'foo.o'); + # This tells the test driver that the perl test script executed properly. 1; -- cgit v1.2.3