[Cook] psedo-recipes
Jerry Pendergraft
jerry at endocardial.com
Sat Jun 21 02:04:48 EST 2003
Remember there are two parts to a DMT scheme.
1) recipes (using cook parlance), which describe *how* to build things.
2) the targets, which describe (list) *what* to build.
I believe you are just missing part 2.
Part 1 is easy
/* construct a .h from a .h.footer file */
%1/%2.h : %1/%2.h.footer
{
do some work
cat [resolve [need]] > [target];
}
Now for part2 you must somewhere mention that you want foo/includes.h ala:
targets = /* other stuff */
foo/includes.h
;
Then your normal main target is:
all : [targets]
--
Jerry Pendergraft jerry.pendergraft at endocardial.com
Endocardial Solutions voice: 651-523-6935
1350 Energy Lane, Suite 110 fax: 651-644-7897
St Paul, MN 55108-5254 mobile: 651-491-0163
On Fri, 20 Jun 2003, Aryeh M. Friedman wrote:
>
> If I have a source file like foo/includes.h.footer and need to make foo/includes.h out of some
> operation on it. Yes this sounds exactly like what cook is designed for but here is one
> complication ALL "real" recipes in my cookbook depend on various dependancies that can not
> be derived until foo/includes.h exists. Add on top of this that foo/xxxx is a variable location
> that can only be calculated once foo/includes.h exists. I do not want to make a special case
> recipe to handle this one case. I want something like this:
>
> if foo/includes.h.footer is older then foo/includes.h then
> {
> do some work
> cat foo/includes.h.footer > foo/includes.h
> }
>
>
> the closest I have come up is something like this ([foo] = foo/includes.h):
>
> if [not [exists [resolve [foo]]]] then
> {
> cat [foo].top > [foo];
> }
>
> Any other ideas?
>
> --Aryeh
> _______________________________________________
> Cook-users mailing list
> Cook-users at auug.org.au
> http://www.auug.org.au/mailman/listinfo/cook-users
>
More information about the Cook-users
mailing list