ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ernst de Haan <>
Subject Re: converting ant from a make file
Date Fri, 18 Sep 2009 12:44:29 GMT

> How does the operating system know when to execute makefile.linux and
> makefile.Windows_NT.
> How do I do this in ant?

Normally, you should avoid any OS-differences. Really. Try to get rid  
of all OS-specific stuff as much as you can.

So much for the theory. Now the practice is that things can still be  
OS-dependent, for example if you have binary libraries or executables.  
In this case, Ant provides several ways to make decisions based on the  
OS. The first thing to consider is the following Ant properties:

Then you can use a <condition> to make a decision based on a certain  

If that's not enough, you can -for example- use <and>/<or>/<not> tasks 

as available via ant-contrib.

For a bit more information, see:

Met een vriendelijke groet,

Ernst de Haan
PensioenPage B.V.

tel. +31 6 20246157

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

View raw message