help-make
[Top][All Lists]
Advanced

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

Re: figuring out the target name?


From: Paul D. Smith
Subject: Re: figuring out the target name?
Date: Mon, 30 Sep 2002 00:33:11 -0400

%% address@hidden writes:

  m> Is there a way to figure out the name of the top level target?

  m> so if I specify foo-draft as my target via 'gmake foo-draft' i
  m> trigger that extra variable addition.

You can discover what targets were passed on the command line by looking
at MAKECMDGOALS.  See the GNU make manual.

Note this doesn't tell you what the default target is, only what the
targets specified on the command line were (if any).

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "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]