help-make
[Top][All Lists]
Advanced

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

Re: complex makefile help


From: Chris Inacio
Subject: Re: complex makefile help
Date: Tue, 23 Mar 2004 17:12:43 -0500
User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)

Thank you for the help everyone...that was indeed the problem, that I didn't escape the $< with another $. Which makes sense. I've spent so much time on this (especially intially trying to get dmake to do what I want....) that it was harder than it should be at this point.

thanks for the help,
chris


Paul D. Smith wrote:

You need to escape the $< as $$<.

I think you should try to find a way to do what you want without using
more than one depth of $(call ...)

This is the order of evaluation:

 $(foreach tget,$(TARGET_SYS),$(call 
FileExpander,$(tget),$(TARGET_SRC_C),CVarTargetBuild))

That evaluates FileExpander:

 define FileExpander
 $(foreach tfile,$(2),$(eval $(call $(3),$(tfile),$(1))))
 endef

With $3=CVarTargetBuild, you get:

 $(foreach tfile,$(2),$(eval $(call CVarTargetBuild,$(tfile),$(1))))

The $(call CVarTargetBuild,...) here will _expand_ the variable
CVarTargetBuild.  That expansion will resolve all variable references,
not just the $(1), etc. variables.

During that expansion, $< is expanded into the empty string (since that
variable only has a value when the command script is run.


So, the value you send to $(eval ...) as a result of the call doesn't
have $< in it, it just has the empty string.

Replace it with $$< and you should be OK.






reply via email to

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