summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@kolpackov.net>2005-12-09 16:46:19 +0000
committerBoris Kolpackov <boris@kolpackov.net>2005-12-09 16:46:19 +0000
commit0e6c4f5b0ed4183bbdb8cdce168dcbd1bc9cf182 (patch)
tree5b601d66155fc716b66fc98b420f9125bd348fd0 /tests
parenta34b85490d26a9064f892e43b8c6fa8005a7c770 (diff)
downloadgunmake-0e6c4f5b0ed4183bbdb8cdce168dcbd1bc9cf182.tar.gz
Fixed bug #13022 by setting is_target flag on files that this implicit
pattern rule also makes.
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog4
-rw-r--r--tests/scripts/features/patternrules30
2 files changed, 34 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 93cac87..e222ef1 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,7 @@
+2005-12-09 Boris Kolpackov <boris@kolpackov.net>
+
+ * scripts/features/patternrules: Add a test for bug #13022.
+
2005-12-07 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/double_colon: Add a test for bug #14334.
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;