From 95c2db7b8d95529e00dd2988c0b3901a0cb9aa17 Mon Sep 17 00:00:00 2001 From: Dmitry Goncharov Date: Sat, 17 Dec 2022 14:12:41 -0500 Subject: [SV 63484] Force included makefiles to be explicit Ensure included makefiles are not treated as intermediate, even if they are created by an implicit rule. Reported by Patrick Oppenlander . * src/read.c (eval_makefile): Mark makefiles as explicit. * tests/scripts/features/include: Add a test. --- tests/scripts/features/include | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests') diff --git a/tests/scripts/features/include b/tests/scripts/features/include index 7f216434..76e365b9 100644 --- a/tests/scripts/features/include +++ b/tests/scripts/features/include @@ -472,4 +472,19 @@ all: ; '', "C:__foobar\n#MAKE#: 'all' is up to date."); } +# sv 63484. +# Test that included makefiles are not intermediate. +# Here 'test.foo' is mentioned explicitly and cannot be considered +# intermediate. +&touch('test.foo', 'test.x', 'test'); +run_make_test(q! +.PHONY: force +include test.foo +%.foo: force; touch -a $@ +%.x: %.foo; touch $@ +test: test.x; touch $@ +!, '', "touch -a test.foo\n#MAKE#: 'test' is up to date.\n"); + +unlink('test.foo', 'test.x', 'test'); + 1; -- cgit v1.2.1