From 652234e967b825478d0b756a65353f252adf73d3 Mon Sep 17 00:00:00 2001
From: Paul Smith <psmith@gnu.org>
Date: Fri, 28 Mar 2003 06:31:44 +0000
Subject: Fix bug #2515: the .SECONDARY target with no prerequisites wasn't
 behaving properly (if you listed prerequisites it worked properly).

---
 tests/scripts/targets/SECONDARY | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

(limited to 'tests/scripts/targets/SECONDARY')

diff --git a/tests/scripts/targets/SECONDARY b/tests/scripts/targets/SECONDARY
index 5a60ed2..a6c5dab 100644
--- a/tests/scripts/targets/SECONDARY
+++ b/tests/scripts/targets/SECONDARY
@@ -81,5 +81,32 @@ $answer = "cp foo.f foo.e\ncp foo.e foo.c\n";
 
 unlink('foo.f', 'foo.e', 'foo.d', 'foo.c');
 
+# TEST #7 -- test the "global" .SECONDARY, with no targets.
+
+$makefile2 = &get_tmpfile;
+
+open(MAKEFILE, "> $makefile2");
+
+print MAKEFILE <<'EOF';
+.SECONDARY:
+
+final: intermediate
+intermediate: source
+
+final intermediate source:
+	echo $< > $@
+EOF
+
+close(MAKEFILE);
+
+&utouch(-10, 'source');
+touch('final');
+
+&run_make_with_options($makefile2, '', &get_logfile);
+$answer = "$make_name: `final' is up to date.\n";
+&compare_output($answer, &get_logfile(1));
+
+unlink('source', 'final', 'intermediate');
+
 # This tells the test driver that the perl test script executed properly.
 1;
-- 
cgit v1.2.3