ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veena pandit <v.kri...@gmail.com>
Subject Re: converting ant from a make file
Date Fri, 18 Sep 2009 13:14:47 GMT
Based on what you said,  I am looking to eliminate the OS-differenes.  But
this is what I have.

In the makefile.linux:
LOCAL = /usr/local/project_name
In the makefile.Windows_NT
LOCAL = C:/Project_name.

How do I avoid this?  If I removed the differences what would the universal
LOCAL look like?

Thanks,

Veena

On Fri, Sep 18, 2009 at 8:44 AM, Ernst de Haan <ernst@pensioenpage.com>wrote:

> Veena,
>
> 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:
> os.name
> os.arch
> os.version
>
> Then you can use a <condition> to make a decision based on a certain value.
>
> 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:
>
> http://www.velocityreviews.com/forums/t136207-determine-platform-with-ant.html
>
> Met een vriendelijke groet,
>
> Ernst de Haan
> PensioenPage B.V.
> www.pensioenpage.com
>
> tel. +31 6 20246157
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message