Can I obtain just the second prerequisite in GNU make? [duplicate]

Assuming your prerequisites are regular tokens,

echo $(word 2,$^)

I often find myself giving the first argument a special position, and accessing the remaining prerequisites with

echo $(filter-out $<,$^)

*Though sometimes with the upper solution you might find repeating elements.

Leave a Comment