help-make
[Top][All Lists]
Advanced

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

Re: variable describing target


From: Philip Guenther
Subject: Re: variable describing target
Date: Sun, 9 Sep 2007 21:12:16 -0600

On 9/9/07, Bryan Ischo <address@hidden> wrote:
> Hi all.  Is there a variable describing the target(s) that make was
> invoked with?  For example, if I do:
>
> make libfoo
>
> Is there a variable available in make that will evaluate to "libfoo"?

Yes.  If you check the info pages, following the menu items from the
top, to "Invoking make: Running", and then "Goals", you'll find this:
----
   `Make' will set the special variable `MAKECMDGOALS' to the list of
goals you specified on the command line.  If no goals were given on the
command line, this variable is empty.  Note that this variable should
be used only in special circumstances.
----


Philip Guenther




reply via email to

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