Not seeing anything in documentation, but I could be missing something. If I have:
a b &: c
echo "targets are $???"
$@
will only show a
or b
, but not both. Is there anything that will expand to a b
?
Not seeing anything in documentation, but I could be missing something. If I have:
a b &: c
echo "targets are $???"
$@
will only show a
or b
, but not both. Is there anything that will expand to a b
?
No, I don't think you've missed anything as also pointed out in the comment. Behavior of $@
is as specified / documented:
During the execution of a grouped target’s recipe, the automatic variable ‘$@’ is set to the name of the particular target in the group which triggered the rule.
Would using a variable be an acceptable solution to address your need?
GRP_1 := a b
$(GRP_1) &: c
echo "targets are $(GRP_1)"