ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject Re: Platform detection
Date Thu, 10 Aug 2000 15:43:55 GMT
>>>>> "DO" == Doremieux, Olivier <Olivier.Doremieux@fc.celera.com> writes:

 DO> In my build.xml I want to be able to use it on Multiple
 DO> Plaforms. But depending on the Platform I want to run different
 DO> target.  Let say I want to execute target A & B on Windows and A
 DO> & C on Solaris.  How can I do that?

Maybe we should add an option for this to <available>?

Does

<project ... default="main">
  <target name="check">
    <available value="windows" file="C:\autoexec.bat" />
  </target>

  <target name="A" depends="check">
    ...
  </target>

  <target name="B" depends="A" if="windows">
    ...
  </target>

  <target name="C" depends="A" unless="windows">
    ...
  </target>

  <target name="main" depends="B,C" />
</project>

do the trick?

Stefan

Mime
View raw message