diff options
author | Paul Smith <psmith@gnu.org> | 2003-03-28 06:31:44 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2003-03-28 06:31:44 +0000 |
commit | 652234e967b825478d0b756a65353f252adf73d3 (patch) | |
tree | ad9f9497f6ee9abe4c8d2b0d7d3e04ca12fab24c /tests | |
parent | acb2e6496630080a172d8938f0e0a459ee2929e2 (diff) | |
download | gunmake-652234e967b825478d0b756a65353f252adf73d3.tar.gz |
Fix bug #2515: the .SECONDARY target with no prerequisites wasn't
behaving properly (if you listed prerequisites it worked properly).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ChangeLog | 5 | ||||
-rw-r--r-- | tests/scripts/targets/SECONDARY | 27 |
2 files changed, 32 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 88fffb6..b4ba23e 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2003-03-28 Paul D. Smith <psmith@gnu.org> + + * scripts/targets/SECONDARY: Test the "global" .SECONDARY (with + not prerequisites)--Bug #2515. + 2003-01-30 Paul D. Smith <psmith@gnu.org> * scripts/features/targetvars: Test very long target-specific 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; |