ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Twomey <michael.two...@ireland.sun.com>
Subject Re: Benefits of Ant with other languages
Date Thu, 22 Feb 2001 10:12:07 GMT
Peter Donald wrote:
> 
> At 01:50  21/2/01 -0800, Curtis White wrote:
> >I am kind of curious about the benefits of Ant when
> >using it with other languages. There were quite a few
> >benefits explained in some messages on this list a
> >while back. There is also that article at
> >
> >http://www.lutris.com/journal/January2001/articles/antEnhydra.html
> >
> >that explains the benefits of Ant. But none of these
> >explained if those benefits apply to ALL uses of Ant
> >or only to Java programs. So my question is, do those
> >benefits still apply if you are compiling programs
> >using other languages besides Java? For example, if I
> >am using Ant to build Delphi or C++ programs, do those
> >benefits still apply? Or is it better to use Make (or
> >something else) for those other languages?
> >
> >What benefits would I gain by using Ant when compiling
> >other languages?
> 
> Well .. it depends if you the effort into writing tasks ;) If you put them
> into writing tasks and the directory structure is appropriate then you will
> get similar benefits. Currently I use ant mainly for java, web (xml/html
> manipulation) and geometry manipulation. I still use make for compiling
> c/c++ stuff as I am too lazy to actually code a cc task ;)
> 

I find the apply task works quite well for compiling code. Mind you I
tend to structure my C++ projects very like java projects (one file per
class etc) so I don't have any really bizarre interdependencies. I also
compile lots of different esoteric files (mostly message files for
localisation) and I find ant works quite well. 

As long as the project is consistently layed out and doesn't have any
odd quirks that require special work arounds I find I can get away with
using one build.xml file and with different properties files.

Having said that I've never tried to compile a project like Mozilla
using ant :)

I just prefer ant over makefiles as the xml code is so much more
readable than make and being able to write custom tasks is so powerfull.
For small projects you will wind up with much larger ant files than
makefiles but as more and more files are added to the project the same
ant file still manages fine while the makefile has ballooned up
massively. Plus being able to run xmllint and dtd checks on a build file
can only be a bonus in a production environment.

cheers,
	mick

-- 
Michael Twomey
These opinions are my own and do not represent Sun unless otherwise
stated.
Sun Microsystems, Dublin, 8199164, x19164
"Fly my little Makefiles! Fly!"

Mime
View raw message