[Cook] Question about Howto.cook ?

Jason Evans jasone at canonware.com
Thu Jan 19 04:29:33 EST 2006


On Jan 18, 2006, at 8:11 AM, Karl.Schmitt at dfs.de wrote:
> I am evaluating Aegis and Cook for the use
> in our commercial project so far I was successful
> to establish a directory structure and placed
> C++ source files in them. Now I am trying to
> create a Howto.cook file to compile
> and link my C++ sources. Here comes the question
> the Cook tutorial just uses one Howto.cook file
> for the whole project while with 'make' we had
> a 'Makefile' in very subdirectory. In case I only
> want to build the content of a specific sub directory
> what should I do. How does it work? If there is
> no Howto.cook file how does cook know to build
> the content?

The approach I take is to create separate build targets for the  
various subdirectories, so that if I want to build just the files in,  
say, lib/libfoo, I can type, 'cook lib_libfoo_all', or something  
similar.  This approach is far superior to using recursive invocation  
of make (or cook), since if you avoid recursive building, you have  
the ability to define the entire set of build dependencies.  If you  
use recursive invocation, you only have partial dependency  
information; at best you tend to do extra work every time you build,  
but quite often you also miss some critical dependencies and end up  
with inconsistent builds, which is a *huge* waste of developer effort.

Peter Miller (the author of cook) wrote a paper on this subject that  
I highly recommend:

	http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html

Jason Evans




More information about the Cook-users mailing list