help-make
[Top][All Lists]
Advanced

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

RE: Executing Recipe


From: Mark Galeck (CW)
Subject: RE: Executing Recipe
Date: Tue, 13 Sep 2011 06:32:53 -0700

>
foo: create_files 
        $(call MY_VAR2, ls)
        @rm -f *.foo 

>My question is: call is a make built in function and not a bash command. How
than it is being executed by shell? 


Anything of the form $(foobar ...) is "expanded" by make at some time.  
"Expanded" means, $(foobar ...) is replaced with some "value" (the exact 
meaning of "value" depends on what "foobar" is - if "foobar" is "built-in", it 
has the meaning defined in the manual, if it's defined by you, it has your 
meaning).

At what time the expansion happens?  - it depends.  Read section 3.7 of the 
manual.  You will find that $(foobar  ... ) in a recipe (the part of a rule 
that gets executed), is expanded at the time that the recipe needs to be 
executed.  

Although I can't find it written anywhere in the manual, I guess it is obvious 
and understood, that that expansion happens first, then the expanded (possibly 
recursively) recipe, is given to the shell for execution.  

Mark  



reply via email to

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