Possible Duplicate:
How to get the second dependency file using Automatic Variables in a Makefile?
I am using GNU make, and I’m using automatic variables such at $<, $^ etc. I know that $< is just the first prerequisite, and $^ is all the prerequisites. Is there a way to obtain just the second prerequisite?
Assuming your prerequisites are regular tokens,
I often find myself giving the first argument a special position, and accessing the remaining prerequisites with
*Though sometimes with the upper solution you might find repeating elements.