[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Listing the targets defined in a makefile
From: |
Paul Smith |
Subject: |
Re: Listing the targets defined in a makefile |
Date: |
Tue, 09 Jan 2007 08:54:30 -0500 |
On Mon, 2007-01-08 at 15:10 +0200, Ville Laurikari wrote:
> Hi,
>
> I'd like to automatically apply some target specific variables and
> order-only prerequisites to targets defined in makefiles. Is there a
> magic variable or function to get a list of all targets defined in a
> particular makefile? I know about .VARIABLES, MAKEFILE_LIST and the
> rest, but there doesn't seem to be a .TARGETS or similar special
> variable to list targets.
I wrote a .TARGETS variable at the same time I created the .VARIABLES
variable. Unfortunately, do to a quirk of the parser in GNU make it had
an inconsistency in its value (a target was not added onto the list
until the entire rule had been defined). I didn't want to create the
variable until it worked properly (instead of creating it, then changing
the way it worked later) so I removed it again. The code still exists,
but it's commented out.
At some point we will change the parser to define targets immediately,
then this can be resurrected.
--
-------------------------------------------------------------------------------
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