So your utility requires, for the file "foo.in", e.g.:

utility foo.in blahfoo.in

but the target file is determined automatically?
(<mapper> w/o <targetfile>)

In this case I might have to recommend antcontrib's
<for>.  Even if we added the ability to duplicate
<srcfile> and/or <targetfile>, "foo.in" would still be
a separate argument from "blah".

-Matt

--- b <[EMAIL PROTECTED]> wrote:

> I'm trying to code up an <APPLY> in ANT.
> 
> I need to run a utility which takes 2 parameters, 1)
> a source file name 
> (<srcfile/>), and 2) something derived from the
> source file name (<arg 
> value="...">).   The output of this program is a
> file, whose name is 
> derived from the source file name (<targetfile/>,
> which is used for 
> timestamp checking.
> 
> My problem is deriving the 2nd parameter.  I can't
> use a <mapper> 
> because it is already in use to handle <srcfile/>
> and <targetfile/>.
> 
> Does <srcfile/> ever get put into a property that I
> can access?  Then it 
> would be simple.  I can add <arg
> value="blahblahblah${srcfile}">
> 
> Otherwise, I think I am stuck.   Although I could
> alter the utility to 
> accept 'blahblahblah' as a parameter and derive parm
> 2 myself in the 
> utility, I would rather not do that.  I'd just as
> soon go back to Make.
> 
> Also, ant apprently won't allow me to specify
> <srcfile/> twice.
> 
> loose Example of what I'm tyring...
> 
>          <apply executable="utility"
> relative="true">
>              <srcfile/>
>              <arg value="blah${srcfile}/>   
> ****problem here****
>              <fileset refid="sourceFiles"/>
>              <mapper type="glob" from="*.in"
> to="*.in.done"/>
>          </apply>
> 
> Any hints?
> Thanks..
> 
> 
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to