diff options
author | Dmitry Goncharov <dgoncharov@users.sf.net> | 2022-12-17 14:12:41 -0500 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2022-12-18 20:06:38 -0500 |
commit | 95c2db7b8d95529e00dd2988c0b3901a0cb9aa17 (patch) | |
tree | 6e2df1847d1d5b8987b0af9efa137b9749154b9e /tests | |
parent | 5d1b757517b5ef3db5b7150fbcf7a310a3c627ce (diff) | |
download | make-git-95c2db7b8d95529e00dd2988c0b3901a0cb9aa17.tar.gz |
[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 <patrick.oppenlander@gmail.com>.
* src/read.c (eval_makefile): Mark makefiles as explicit.
* tests/scripts/features/include: Add a test.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scripts/features/include | 15 |
1 files changed, 15 insertions, 0 deletions
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; |