ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: [apply] and m4
Date Tue, 26 Jun 2001 06:11:21 GMT
Doug Morse <morse@pobox.com> wrote:

>   <target name="create_triggers">
>     <apply executable="m4" dir="../triggers" dest="../triggers"
>       failonerror="true">
>       <srcfile/>
>       <arg line=" > "/>
>       <targetfile/>
>       <fileset dir="../triggers" includes="*.m4"/>
>       <mapper type="glob" from="*.m4" to="*.sql"/>
>     </apply>
>   </target>
> 
> in an attempt to get Ant to redirect the output to the targetfile,
> but this doesn't work either in that the ">" character just gets
> treated as a filename by m4, as does the targetfile:
> 
>     [apply] /usr/bin/m4: >: No such file or directory [apply]
>     /usr/bin/m4: Users_A_Audit_U01.sql: No such file or directory
> 
> Ant is probably ensuring that the commands it executes do not use
> redirection (as it should, IMHO).

No, Ant doesn't prevent this at all.  If you use > and < on the
command line (at least on Unix) it is the shell that performs the
redirection - m4 won't even see it.

Stefan

Mime
View raw message