<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>RE: [Cook] How can I make my cook file stop always generatingdependency files? -- LONG --</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>I believe your problem is due to a couple simple things:<BR>
1) #include-cooked [pkg_dependencies] should be:<BR>
#include-cooked-nowarn [pkg_dependencies]<BR>
2) On the dep file recipes<BR>
set no-cascade should be<BR>
set nocascade<BR>
<BR>
There are also some simplifications you could easily do.<BR>
First you don't need 2 recipes for the dep files. You can combine them into one using another pattern match. The following would work for both .cpp .hpp plus .hxx .C .c or anything.<BR>
<BR>
%0%.%1_dep: %0%.%1<BR>
set nocascade<BR>
{<BR>
function Say-Why [__FILE__] [__LINE__];<BR>
c_incl --no-cache --no-recurs %0%.%1<BR>
-I[dirname %0%.%1] [cpp_incl]<BR>
"--prefix='cascade %0%.%1 = '"<BR>
"--suffix=';'"<BR>
-o [target]<BR>
set silent;<BR>
}<BR>
<BR>
Second your loop where you define the variables could be:<BR>
/* turn the list of packages into a list of libraries */<BR>
loop local var_name = [pkg_names]<BR>
{<BR>
local var_lib = [prepost lib/lib .a [var_name]];<BR>
[var_lib]_src = [match_mask [var_name]/%0%.cpp [MANIFEST]];<BR>
[var_lib]_hdr = [match_mask [var_name]/%0%.hpp [MANIFEST]];<BR>
[var_lib]_xml = [match_mask [var_name]/%0%.xml [MANIFEST]];<BR>
[var_lib]_obj = [fromto %0%.cpp %0%.o [[var_lib]_src]];<BR>
[var_lib]_dep = [addsuffix _dep [[var_lib]_src]] [[var_lib]_hdr]];<BR>
;<BR>
function print [var_lib]_src is [[var_lib]_src];<BR>
function print [var_lib]_dep is [[var_lib]_dep];<BR>
<BR>
if [count [[var_lib]_obj]] then<BR>
{<BR>
pkg_libraries += [var_lib];<BR>
pkg_dependencies += [[var_lib]_dep];<BR>
}<BR>
}<BR>
<BR>
<BR>
Jerry Pendergraft voice:651-523-6935<BR>
St.Jude Medical mobil:651-491-0163<BR>
Atrial Fibrillation Division email:jpendergraft@sjm.com<BR>
1350 Energy Lane<BR>
St.Paul, MN 55108<BR>
<BR>
-----Original Message-----<BR>
From: cook-users-bounces+jpendergraft=sjm.com@auug.org.au on behalf of Henderson, Michael D<BR>
Sent: Mon 22-Aug-05 19:59<BR>
To: cook-users@auug.org.au<BR>
Subject: [Cook] How can I make my cook file stop always generatingdependency files? -- LONG --<BR>
<BR>
I'm trying to create a cook book based on the sample that uses dependency files in the user's guide. I've got it working, but there are a few things that I don't understand. The cook file is attached, it's long but I don't know which parts to cut out and still make it understandable.<BR>
<BR>
1. When I run a "cook what" to create a dump of my variables so that I can verify what I'm doing, it always re-creates all of my _dep files. I'm pretty sure it's because of this line<BR>
#include-cooked [pkg_dependencies]<BR>
Is there a way to make that conditional?<BR>
<BR>
2. The sample had the cpp_dep files created with "set no-cascade" and the hpp_dep files created without that. I've tried it both ways and it seems to work, so I guess that I'm not understanding what it is that the no-cascade option does. I've looked at the manual but remain utterly clueless.<BR>
<BR>
3. Why does the hpp_dep rule look at dirname %0%.cpp? Shouldn't it look at %0%.hpp or since it's doing a dirname, does it even matter?<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>