Roger Vaughn <[EMAIL PROTECTED]> wrote:
> I have a set of targets for each OS that look like this:
>
> <target name="winlib" depends="compile">
> <copy todir="${build.dll}">
> <fileset dir="${src.dll}"/>
> </copy>
> <exec failonerror="yes"
> dir="${build.dll}"
> executable="make"
> os="Windows 2000"/>
> </target>
>
> Notice that I use make to actually do the C++ compiles - this saves
> a lot of headache in Ant. However, this target does the copy task
> each time, regardless of which OS I'm on.
Hmm,
<condition property="iswindows">
<os family="windows" />
</condition>
<target name="winlib" depends="compile" if="iswindows">
....
would do it, no?
Or with less features that are not there yet
<property name="is.${os.name}" />
<target name="winlib" depends="compile" if="is.Windows 2000">
I think your case can properly be handled by target if/unless and
setting some properties.
Stefan