help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to refer to the first target?


From: Paul Smith
Subject: Re: How to refer to the first target?
Date: Mon, 23 Nov 2009 23:58:06 -0500

On Mon, 2009-11-23 at 22:13 -0600, Peng Yu wrote:
> $< refers to the first prerequisite. How to refer to the first target?

Not sure what you mean: generally there is only one target.

If you mean in a pattern rule with multiple target patterns, there is no
way.  You can construct it with $*, but since, unlike prerequisites, all
targets have to be defined right there in the rule it's not as important
to be able to generically refer to the "first" target.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist





reply via email to

[Prev in Thread] Current Thread [Next in Thread]