[PLUG] gnu make exported variable expansion
Galen Seitz
galens at seitzassoc.com
Thu Oct 25 02:29:23 UTC 2007
I have a Makefile that is set up to create listing files when gcc is
run. This is done with the following switch in CFLAGS.
CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
This works fine at the top level, however I'm trying to get it to work
with a recursive make. CFLAGS is exported to pass it to the recursive
make. I believe my problem is that $< gets expanded to an empty
string when CFLAGS is exported, leaving the listing filename set to
.lst instead of sourcefile.lst. What is the correct way to do
something like this?
thanks,
galen
More information about the PLUG
mailing list