help-make
[Top][All Lists]
Advanced

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

RE: how to do recursive "subsystem" make properly?


From: Mark Galeck (CW)
Subject: RE: how to do recursive "subsystem" make properly?
Date: Mon, 9 Nov 2009 11:03:07 -0800

>Hi Paul,

>       prog: foosrc/libfoo.a
>               ...do something...
> 
>       foosrc/libfoo.a: FORCE
>               $(MAKE) -C foosrc
> 
>       FORCE: ;

>Sorry if the answer is obvious, but I don't understand why "prog" isn't 
>simply always rebuilt, because libfooa is always updated. Is it because 
>the command is $(MAKE)?


Hi Christophe, I am not Paul, I am the one from which this thread originally 
generated, and this method works for me.  

In fact I should perhaps say, "I am no Paul" :)  but let me comment on why I 
think it works.  


To decide whether to execute commands for a target, make considers whether any 
prerequisites are newer than the target.  When does it do that?  Only _after_ 
they themselves are processed, not before.  I am not sure whether this is 
mentioned in the manual, but of course it would not make sense to do it before. 
 

Mark






reply via email to

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