[bug #67825] $^ is set incorrectly in the case of grouped targets
<[email protected]> Fri, 19 Dec 2025 10:42:00 -0500 (EST)
| Newsgroups | gmane.comp.gnu.make.bugs |
|---|---|
| Message-ID | <[email protected]> |
Follow-up Comment #3, bug #67825 (group make):
> There is no mechanism of propagating prerequisites of a target to an
> unrelated target.
The targets are not *unrelated* -target1 and target2 are *grouped*.
In the third example:
> touch file2
> make target1
The grouped target rule _target1 target2 &: file1_ fires although target1 has
no direct dependency to file2.
Target1 and target2 are grouped, thus the dependencies of target2 trigger the
recipe of the grouped target rule in this case.
The debug option prints in this case:
Finished prerequisites of target file 'target1'.
Prerequisite 'file1' is older than target 'target1'.
Must remake target 'target1'.
Makefile:7: update target 'target1' due to: unknown reasons
echo '$@ : target1'
This behavior is absolutely correct. But it is not reflected in variables $?
and $^.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?67825>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaUVyRwAKCRCqLAuaBUf3 TgriAP9uogBxJucE5aEg5veVPEbofJQg1wuKpRFBMPx61TPpCAEAwR9bqgG/lqsn MAmjGfgdZTrtRvTUAeWkxa/3GLeOPw0= =+C4a -----END PGP SIGNATURE-----