From 297cb5adb7bdde0cb04462f05deba1fba26ccce9 Mon Sep 17 00:00:00 2001 From: Dmitry Goncharov Date: Sun, 30 May 2021 13:58:50 -0400 Subject: [PATCH] * tests/scripts/targets/INTERMEDIATE: [SV 60188] Add one more test --- tests/scripts/targets/INTERMEDIATE | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/scripts/targets/INTERMEDIATE b/tests/scripts/targets/INTERMEDIATE index 512498c3..e25a6135 100644 --- a/tests/scripts/targets/INTERMEDIATE +++ b/tests/scripts/targets/INTERMEDIATE @@ -104,5 +104,21 @@ $answer = "touch foo.a\ntouch foo\nrm foo.a\n"; unlink('foo'); +# sv 60188. +# A file made by an implicit rule, but explicitly mentioned by the user, is +# still considered intermediate if it's a prereq to .INTERMEDIATE. + +touch('hello.z'); +unlink('test.x'); + +run_make_test(q! +all: hello.z +%.z: test.x; touch $@ +%.x: ; +.INTERMEDIATE: test.x +!, '', "#MAKE#: Nothing to be done for 'all'.\n"); + +unlink('hello.z'); + # This tells the test driver that the perl test script executed properly. 1;