ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Beton <>
Subject Re: Ant & C?
Date Mon, 13 Nov 2000 10:04:26 GMT
Paul Jimenez wrote:

> How easy is it to use Ant to compile and link C programs?  libraries?
> I'm looking for examples of how this is done before I decide to try it
> out in a production environment.  For real fun, a Makefile-to-Ant.xml
> converter would go a long way toward getting Ant accepted for real
> amounts of use.

I noticed some difficulty in writing makefile-like ant buildfiles, particularly for compiling
some JNI native C in the
case I was working with.

I found that there is an undocumented 'update' task to detect file dependencies. It works
fine, but I ended up with a
buildfile that is far more complex than the equivalent makefile. Surely Ant ain't gonna be
beaten by Make! C'mon guys!

What I needed for my specific application is a 'gcc' task. Is anyone writing one? It's an
obvious candidate to be a
built-in task.

More generally, Ant would benefit from a modified version of the 'update' task as a predicate
to any other task, i.e.
like 'if' and 'unless'. Then it would be possible to generate target file a.o from a.c iff
a.c had changed. Hmmm, maybe
this is asking too much: it opens a can of worms on dependency checking that is better addressed
through the
implementation of specific Ant tasks (gcc, ld, etc). This is because makefiles usually have
a load of header-file
dependencies (assuming the author is thorough).


View raw message