Re: how to write a general rule

j.beyer-S0/[email protected]
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
On Thu, Nov 06, 2003 at 10:19:22AM +0100, Lars Ivar Igesund wrote:
> ----- Original Message ----- 
> From: "Joerg Beyer" <j.beyer-S0/[email protected]>
> 
> > Dear Listreader,
> > 
> > I am not sure, how to write a generell aap-rule. I have a
> > inputfile x.in that sould be transformed to x.out. For the
> > sake of simplicity let's assume that the tranformation is
> > a sed step.
> > 
> > So I have this aap rule:
> > 
> > ------------------
> > x.out : x.in
> >         :sys sed -e "s,e,X,g" <$source  >$target
> > ------------------
> > 
> > This works fine. Now my question: how do I generalize
> > this rule for file x.in to any file that ends with a ".in"?
> > 
> > 
> >     Joerg
> > 
> > @bram: I cant find this in the manual, but I will make up
> > a documented example for the documentation - if you like.
> 
> Are you sure about this? Have you looked at this page:
> 
> http://www.a-a-p.org/exec/user-filetype.html
> 
> and maybe also
> 
> http://www.a-a-p.org/exec/user-language.html
> 
> Also, look at the commands :action, :do, :rule and :route.
> 
yes, I read those parts of the manual - but to be hoenst,
I dont fully understand it. I understand, that I have to
define a filetype (in my case that would be like this:
:filetype·
        suffix in myin
        suffix out myout

# this says: everything ending with ".in" is of the type "myin"
# and files ending ".out" are of the type "myout".
)

But my question is: how could I tell aap, that to do, when aap
should make an x.out of an x.in.

I assume, that this is very simple.

        any suggestion is welcome
        Joerg


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.