[Top][All Lists]

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

Re: complex makefile help

From: Paul D. Smith
Subject: Re: complex makefile help
Date: Tue, 23 Mar 2004 15:50:44 -0500

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 

That evaluates FileExpander:

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

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.

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