mirror of
https://github.com/mirror/make.git
synced 2025-01-30 06:11:02 +08:00
[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.
This commit is contained in:
parent
5d1b757517
commit
95c2db7b8d
@ -404,6 +404,7 @@ eval_makefile (const char *filename, unsigned short flags)
|
||||
deps->file = enter_file (filename);
|
||||
filename = deps->file->name;
|
||||
deps->flags = flags;
|
||||
deps->file->is_explicit = 1;
|
||||
|
||||
free (expanded);
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user