ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Plessers <tpless...@tiscali.be>
Subject Re: Apply m4 acts weird in Linux
Date Thu, 14 Aug 2003 16:27:20 GMT
This is indeed the best solution, however, I'm not a shell script expert.  Can 
you give me a hint on how to pass <srcfile/>, <targetfile/> and 
-I${src.abs.dir} into the script?  In this case, I still have to pass more 
than 1 argument with ant, right?

Note that <srcfile/> is TestProject.jm4  and <targetfile/> is TestProject.java
Perhaps I can only pass <targetfile/> and do some string manipulation on it to 
get its extension correct.

Greets,
Tim Plessers

On Thursday 14 August 2003 16:59, Stefan Bodewig wrote:
> On Thu, 14 Aug 2003, Tim Plessers <tplessers@tiscali.be> wrote:
> > So my next question is, how can I also pass <srcfile/>, &gt; and
> > <targetfile/> in 1 <arg> element?
>
> No.  I should have known (and told you) that this problem would come
> next, sorry.
>
> The best solution I see for m4 is: write a little wrapper script for
> it like
>
> #!/bin/sh
> OUT=$1
> shift
> exec m4 "$@" > "$OUT"
>
> and invoke that (with <targetfile/> as first argument) instead of m4.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message