ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank E. Weiss" <>
Subject Re: multiple targets on command line
Date Mon, 14 Jan 2002 23:03:30 GMT
david jencks wrote:

> > The feature makes sense to me.
> > --want things only done once, I make a target with depends in build.xml
> > --want them done once/target, use command line.
> >

Well, it's not an intuitive feature to some of us. I think the problem stems from ant's descendency
from make.

"Ant is a Java-based build tool. In theory, it is kind of like make, without make's wrinkles."

So in theory, it behaves like make(?). However if you create a similar example with make:

default: bar
 echo foo
bar1: foo
 echo bar1
bar2: foo
 echo bar2

And run "make bar1 bar2", the result is

If you take Dan Lipofsky's example and run ant with -verbose, you'll see how different ant
is. Ant actually performs the
project twice, overriding the project's default target with each command line target in turn.

ant bar1 bar2
Build sequence for target `bar1' is [foo, bar1]
Build sequence for target `bar2' is [foo, bar2]

My conclusion is that people interpret "in theory" in different ways (in other words, ant's
documentation is a teenie
weenie bit deceptive). The strict interpretation (which does not apparently hold) is that
the functional theory of make
and ant are similar. The intended meaning seems to be "ant can do what make can do, but uses
a different functional
theory." Put another way, consider the C and C++ languages. C++ is like C, but to use C++
effectively, you have to think
differently than you did when you used C.

Your hints as to where to add this in the Ant documentation are welcome.

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

View raw message