ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wout.de.ze...@philips.com
Subject terminology
Date Wed, 14 Mar 2001 13:47:18 GMT
Hi,

I have taken a quick look at the ant docs, and I would like to make some comments about the
terminology used. I have been using traditional gnu make styles of make and I think their
angle of looking at it is more clear. Let me highlight some parts from 
section "Using Ant" of your docs, mainly from subsection "Targets" (in double quotes):

"Each project defines one or more targets. A target is a set of tasks you want to be executed.
When starting Ant, you can select which target(s) you want to have executed. When no target
is given, the project's default is used."

I.m.h.o. a target is not a set of tasks, but just a file or whatever desirable object. The
set of tasks is the means of getting the target: If the target is out of date, the set of
tasks will be executed in order to make the target up to date. That's the 
basic idea of a make utility.

"You might have a target for compiling, for example, and a target for creating a distributable."

Again, target is seen as an action, while it's not. A target is just a file. Compiling is
the only the means, not the goal/target. Something like this could be more appropriate: 'You
might have several targets for creating java class files, and a target 
for a jar file which groups these together. The latter target then depends on the former targets.'

"It should be noted, however, that Ant's depends attribute only specifies the order in which
targets should be executed - it does not affect whether the target that specifies the dependency(s)
gets
executed if the dependent target(s) did not (need to) run"

Same again. A hint is that a "target is executed" isn't correct english even, unless you mean
the other meaning of executed. A target is made, not executed; the set of task is executed.
This terminology is more natural and builds a clearer image of how 
things work.

In subsection "Tasks" a task is defined as a piece of code that can be executed. This is more
like it!

For the same reasons as above I don't like the example. A target called "init" and "compile",
yuck. You want to make a target called compile? The target is a set of java classes, the target
name should reflect that, not the action. So call it "classes" 
or "build tree". Init isn't good either, the target is really a directory structure, so called
it "dirs" or something. The way the example and the whole page is set up is to see the makefile
as a script, but it isn't a script. A makefile is descriptive, 
and not procedural. A target should really be a noun, not a verb. ("Clean" isn't a really
good target either, it's a pronoun, but at least "make clean" makes sense, as opposed to "make
compile" and "make init". And "make clean" is a very common 
construction with developers.)

Maybe my comments seem unimportant because it doesn't change how things work, but I think
that getting the terminology and examples right is very important for a proper understanding.


Kind regards,

Wout de Zeeuw

Philips Medical Systems, EasyVision
Room: 		QV-123
Phone:		040-2764094
e-mail:		wout.de.zeeuw@philips.com

Mime
View raw message