ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: How does <exec> interpret an empty output property
Date Wed, 10 Nov 2004 15:23:15 GMT
--- wrote:
> I have a macrodef passing on a logfile attribute to
> exec's output
> property. If I want as default to have no logfile,
> how do write this in
> the macrodef?

If you have a fairly limited number of platforms to
work on, like Un*x vs. dos-based (Windows etc.), you
could do something like this:

<target name="foo" depends="defaultlogfile">
  <!-- do something with ${logfile} -->

<target name="defaultlogfile">
  <condition property="logfile" value="/dev/null">
    <os family="unix" />
  <condition property="logfile" value="NUL">
      <os family="windows" />
      <!-- should work on netware as well -->
      <os family="netware" />
  <fail unless="logfile" />

> Sten Rosendahl


Do you Yahoo!? 
Check out the new Yahoo! Front Page. 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message