help-make
[Top][All Lists]
Advanced

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

Er:Re: functions on prerequisites


From: Jim McElwaine
Subject: Er:Re: functions on prerequisites
Date: Sun, 31 Aug 2003 16:23:51 +0100

Hi,

Thanks very much for your help $(eval ...) works a treat now I've
upgrade to 3.80 and figured it out.

Copying the example in the info I used

AVIF := $(wildcard */*-cnt.avi) 
AVI  := $(notdir $(AVIF:%-cnt.avi=%))

define AVIP
$(1)/$(1)-cnt.avi:  $(1)/fct.mat 
endef

$(foreach prog,$(AVI),$(eval $(call AVIP,$(prog))))

$(AVIF): 
        command to update  $@


Jim
 

Thanks for your help.

I can't find $(eval ...) anywhere in the info documentation


Paul D. Smith writes:
 > %% Jim McElwaine <address@hidden> writes:
 > 
 >   jm> I want to make rules like the following
 > 
 >   jm> $(A): %: $(dir %)/a
 > 
 >   jm> where I operate with string functions on % to generate the
 >   jm> dependencies but these do not seem to be evaluated Is there are
 >   jm> any solution to this without generating an intermediate file?
 > 
 > The only ways are with an intermediate file, or using $(eval ...)
 > 
 >   jm> The info files say intriguingly that normaly only on "%" is used
 >   jm> in a patterm mathcing rule but they don't explain how to use more
 >   jm> than one, which would actually work for me.
 > 
 > You can't use more than one.
 > 
 > -- 
 > -------------------------------------------------------------------------------
 >  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
 > 

-- 
Dr. Jim McElwaine   Work: 01223 337858 Home: 01223 710497
H0.15, Department of Applied Maths and Theoretical Physics
Centre for Mathematical Sciences,     Cambridge University  
Wilberforce Road, Cambridge, CB3 0WA  
email: address@hidden 
http://www.damtp.cam.ac.uk/user/jnm11/




reply via email to

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