mirror of
https://github.com/mirror/make.git
synced 2026-08-26 20:03:27 +08:00
Do not force targets to be SECONDARY
In SV 43677 we forced targets to be secondary if we found an intermediate file that was listed as a prerequisite of another target. This overrides .INTERMEDIATE settings, so doesn't work. Now that we have an is_explicit flag in targets, use that instead. * src/implicit.c (pattern_search): Remove setting of secondary. Preserve the value of the is_explicit flag when creating a new file target, and consider it when setting the intermediate flag. * tests/scripts/features/patternrules: Add a test w/out INTERMEDIATE * tests/scripts/targets/INTERMEDIATE: Add a test with INTERMEDIATE
This commit is contained in:
@@ -444,5 +444,17 @@ hello.tsk:
|
||||
|
||||
unlink('hello.tsk');
|
||||
|
||||
# A target explicitly listed as a prerequisite of a pattern rule, is still
|
||||
# considered mentioned and "ought to exist".
|
||||
|
||||
run_make_test(q!
|
||||
1.all: 1.q ; touch $@
|
||||
%.q: 1.r ; touch $@
|
||||
%.r: ; touch $@
|
||||
!,
|
||||
'', "touch 1.r\ntouch 1.q\ntouch 1.all\n");
|
||||
|
||||
unlink('1.all', '1.q', '1.r');
|
||||
|
||||
# This tells the test driver that the perl test script executed properly.
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user