<!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] to enhance cook</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>The easiest thing to do for your erlang files is to use sed or perl to filter them such that<BR>
-include ("../include/cmmc_config.hrl"). <---------<BR>
becomes<BR>
#include "../include/cmmc_config.hrl"<BR>
<BR>
Then pipe that through c_incl to create your cascade dep file. So the recipe might be something like (untested):<BR>
%0%.erl.d : %0%.erl<BR>
{<BR>
perl -ne [quote 'if( m!^-include\s+\(([^\)])\)! ) { print "#include $1\n"; }']<BR>
| c_incl [c_incl_args] - > [target];<BR>
}<BR>
Note that c_incl cares nothing about any lines but include, so you can ignore everything else in your sources.<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 Dietmar Schaefer<BR>
Sent: Wed 07-Dec-05 02:47<BR>
To: cook-users@auug.org.au<BR>
Subject: [Cook] to enhance cook<BR>
<BR>
Hi !<BR>
<BR>
<BR>
O.K. your last tips worked !<BR>
<BR>
Now I would like to enhance cook to be able to handle erlang files !<BR>
<BR>
<BR>
I had short look into the c receipe .<BR>
<BR>
Can someone tell me where I need to change things to get a new erl_incl<BR>
command which can be used by cook ?<BR>
<BR>
Here is a short example of erlang code<BR>
<BR>
<BR>
-module(cmmc_4dp).<BR>
<BR>
-vsn("1.0").<BR>
-export([startall/0,stopall/0,stop/0,start/0]).<BR>
-import(cmmc_util,[msleep/1]).<BR>
<BR>
<BR>
-include ("../include/cmmc_config.hrl"). <---------<BR>
<BR>
<BR>
<BR>
-define(MAX_RESTARTS,3).<BR>
-define(RESTART_INTERVAL,20).<BR>
<BR>
<BR>
Should it be possible to write such "helper programs" like c_incl in<BR>
other languages than c ? for example in ruby,perl,python ?<BR>
<BR>
<BR>
Best regards<BR>
<BR>
Dietmar<BR>
_______________________________________________<BR>
Cook-users mailing list<BR>
Cook-users@auug.org.au<BR>
<A HREF="http://www.auug.org.au/mailman/listinfo/cook-users">http://www.auug.org.au/mailman/listinfo/cook-users</A><BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>