Follow-up Comment #1, bug #68977 (group make): A user reported that make no longer second expands prerequisites of .PHONY.
Here is a copy of the original report
Hi,
I am having some troubles with a Makefile:
```
phony-targets = force
.SECONDEXPANSION:
.PHONY: $$(phony-targets)
test: force
@echo test
```
The makefile works fine when using make 4.3 and "test" is printed as it
should. When using make 4.4.1, I get the error "No rule to make target
'force', needed by 'test'. Stop." This looks to be related to the
change in 4.4 where secondary expansion was narrowed to only the
targets that are considered. I would guess that .PHONY is not
considered during the build, and so doesn't get the secondary expansion
treatment. force is then never mentioned and isn't considered a target.
The makefile does what it is intended to do using make 4.4.1 when I
remove .SECONDEXPANSION (and change $$ -> $), or when I explicitly
mention force as .PHONY. Is this working as intended on make 4.4.1, or
is this a regression in functionality?
Regards
Eskil
The original report is here
https://lists.gnu.org/archive/html/bug-make/2026-11/msg00013.html.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68977>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
