[Cook] two questions

Brendan J Simon brendan.simon at bigpond.com
Sat Nov 2 01:14:07 EST 2002


I'll try to put together a simple project which has the basic features. 
 The one I use at work is big, confusing and probably counts as 
intellectual property which I can not divulge :)

Stay tuned.

Regards,
Brendan Simon.


Shaw, Steven wrote:

>Hi Brendan,
>
>I'd like to hear more about your way of using make.
>
>you wrote:
>  
>
>>I haven't done this with Cook, but with Make I have a 
>>makefile fragment 
>>(module.mk) in each directory which is included by the SINGLE 
>>top level 
>>Makefile.  I've set it up so that I can have a Makefile in 
>>any directory 
>>and it will include module.mk which will control including any 
>>subdirectory module.mk files and so on.  Alternatively, my 
>>subdirectory 
>>makefiles can workout the dependencies (eg. "make all" includes all 
>>module.mk files and sets the ALL variable), figures out the real top 
>>level Makefile and calls it as "make $(ALL)".
>>    
>>
>
>Would you mind explaining how this is done. I assume you are using
>Gnu make (I don't think others have the 'include' command)? I've used
>this technique to a degree (within a bigger project that used recursive
>makefiles). The problem I had was that I had to always refer to the files by there relative path names. I think I always had to issue the make command from the top directory (where the main, aka one-and-only, Makefile is).
>
>Is it possible to teach make to accept 
>	$ make foo.o' 
>in a subdirectory? Instead of have to do something like:
>	$ (cd $TOP; make foo/foo.o)
>
>With your setup, if I am in the foo directory and type:
>	$ make foo
>which relies on bar.so in the bar directory (also under $TOP), will it ensure that bar.so is up-to-date too?
>
>Cheers, Steve.
>
>  
>





More information about the Cook-users mailing list