[Cook] Re: cook making links

Peter Miller millerp at canb.auug.org.au
Sat Nov 13 21:45:29 EST 2004


As of cook.2.17 there is a feature where you can set the type of edge
that appears iun the dependency graph.  This is documented in the User
Guide in a section about making links:

        two: one(weak)
        {
            ln one two;
        }

This tells cook to use a weak time constraint

    up-to-date = (mtime(need) <= mtime(target));

rather than the default "strict" constraint
    
    up-to-date =  (mtime(need) < mtime(target));

There is a third edge type "exists" where the target is only considered
out of date if the ingredient does not exist and has to be created. 
This is handy for things like version strings that change with every
change set, but aren't enough to cause a recompile in their own right.

You can mix and match edge types

     target: one.o(strict) two.o(weak) three.o(exists)
     {
           gcc -o [target] [need];
     }

If you don't define an edge type, it defaults to "(strict)"

-- 
Peter Miller <millerp at canb.auug.org.au>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.auug.org.au/pipermail/cook-users/attachments/20041113/39aa4f2b/attachment.pgp>


More information about the Cook-users mailing list