1

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?

HardcoreHenry
  • 5,909
  • 2
  • 19
  • 44
  • 1
    No, unfortunately. That's not a bad idea though. You could file an enhancement request on Savannah https://savannah.gnu.org/bugs/?func=additem&group=make – MadScientist Feb 25 '20 at 19:52

1 Answers1

0

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)"
Ondrej K.
  • 8,841
  • 11
  • 24
  • 39