Well, the best way would be to fix <antlr> to take a fileset ;-)
Next, you could use SF's ant-contrib's <foreach> task.
Finally, since there's no <apply> equivalent (the same as <exec>, but
executing the command for all files at once or once per file) for <java>,
you could use <apply> with your <fileset> of grammars, executing ANT,
calling the antlr'ize target with the current grammar file as a property.
Not pretty, but the only way I see you could do it with ANT as-is, short of
using a <script> of course ;-) --DD

-----Original Message-----
From: Glen Marchesani [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 10, 2002 2:12 PM
To: [EMAIL PROTECTED]
Subject: how to run a task once for each file in a set....

I have a directory of ANTLR grammers (*.g files) and I want to be able to
run the ANTLR task on each one without having to explicitly specifiy an
<ANTLR> tag for each file is this possible?  I have this need not just for
the ANTLR files so a general solution is most desirable.  The reason is all
the .g files are not always known at the time of writing the build.xml but
are determined in the running of the build.xml.

any help is appreciated.

thanks,
Glen

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to