Hello, here are some hints. 1) You can use os.name property to find the OS you are running on. 2) If you want to execute a native OS command only on the OS that supports it you can use <exec> task with os attribute. See [1] for more details. 3) If you want to run different targets depending on the os you can use <condition> with nested <os> element [2]:
<condition property="isWindows"> <os family="windows"/> </condition> <condition property="isUnix"> <os family="unix"/> </condition> <target name="execute" depends="executeUnix,executeWindows"/> <target name="executeUnix" if="isUnix"> <!-- Do Unix stuff --> </target> <target name="executeWindows" if="isWindows"> <!-- Do Windows stuff --> </target> Regards Ivan [1]http://ant.apache.org/manual/CoreTasks/exec.html [2]http://ant.apache.org/manual/CoreTasks/conditions.html --- JG <[EMAIL PROTECTED]> wrote: > Hi, > > I am writing an ANT config script that is to be used > on multiple platforms > (Windows XP, Mac, Fedora) and I have a target that I > want to run a certain > way for Windows XP and another way for other OS's. > > Is there a way to make a target run only for a given > OS? > > thanks, > joe > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]