ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Morse <mo...@pobox.com>
Subject Re: [apply] and m4
Date Tue, 26 Jun 2001 18:20:50 GMT
Stefan,

OK, thanks.  Strange that I get the results that I do (i.e., the ">"
character being treated by m4 as a filename).  Perhaps I need something
like:

  <target name="create_triggers">
    <apply executable="/bin/sh" dir="../triggers" dest="../triggers"
      failonerror="true">
      <arg line=" m4 "/>
      <srcfile/>
      <arg line=" > "/>
      <targetfile/>
      <fileset dir="../triggers" includes="*.m4"/>
      <mapper type="glob" from="*.m4" to="*.sql"/>
    </apply>
  </target>

instead (i.e., call /bin/sh directly instead of m4)?

Thanks!
Doug


On Tue, Jun 26, 2001 at 08:11:21AM +0200, Stefan Bodewig wrote:
> 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