[Cook] Recipe order
Sandra Carney
scarney at endocardial.com
Sat Mar 1 10:55:37 EST 2003
Memo
========================================================================
Date: February 28, 2003
To: Aegis/Cook User Group
Cc: Jerry Pendergraft
Subject: Determining which recipe to use
========================================================================
012345678012345678901234567890123456789012345678901234567890123456789901
I had recipes for cooking Perl modules( *.pm.pl files ) and cooking
Perl executables from .pl files. Here is the original order of
the recipes :
AUX_GENERATE = /var/tmp/pkgen.00;
.
.
.
[AUX_GENERATE]/%1: [ match_mask %%0%%/%1.pl [project_files] ]
if [ count [ match_mask %%0%%/%1.pl [project_files] ] ]
{
function print [__FILE__] "Line:" [__LINE__] "Creating" [target]
"because of" [younger];
sed -e [quote [catenate "s:_PERL_MAGIC_:" [perl_magic] ":g"]]
[ resolve [ match_mask %%0%%/%1.pl [project_files] ] ] > [target]
&& perl -I[AUX_GENERATE] -cw [target];
}
[AUX_GENERATE]/%1.pm : [ match_mask %%0%%/%1.pm.pl [project_files] ]
{
function print [__FILE__] "Line:" [__LINE__] "Creating" [target]
"because of" [younger]
;
/* Copy the file with token substitution */
sed -e [quote [catenate "s:_PERL_MAGIC_:" [perl_magic] ":g"]]
-e [quote [catenate "s:_FOCUS_ROOT_:/" [PKGDATA] ":g"]]
-e [quote [catenate "s:_ENSITE_BASE_DIR_:/" [INST_BASE_DIR] ":g"]]
-e [quote [catenate "s:_ENSITE_INST_DIR_:/" [PKGINST] ":g"]]
[ resolve [ match_mask %%0%%/%1.pm.pl [project_files] ] ] > [target] &&
/* check for syntax */
[perl_magic] -cw [target];
}
When I wanted it to cook a file like EnsiteDefs.pm.pl, it would apply the
first recipe always. It never looked at the second recipe. If I switched
the order of the recipes, then the recipe for cooking .pm files from
.pm.pl files was applied. Pp. 74 of the user guide seems to confirm this.
That the first applicable recipe will be applied. I had been told that
Cook will apply as specific a recipe as possible.
Does the order of the recipes matter?
Should we have more specific recipes first and then more general ones?
More information about the Cook-users
mailing list