ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simeon Fitch <>
Subject Re: Role of scripts [was Re: increment task]
Date Fri, 27 Oct 2000 12:48:43 GMT
I hope the list doesn't mind an "outsider" offering
some thoughts on the issue of including scripting
within Ant, but I am a major GNU make user (fan) who
has spent part of the last two days evaluating Ant and
trying to decide if it is "time to move on". 

Where I'm coming from: I have been the de facto build
manager for about 5 projects in the > 100 KSLOC size
range (3/4 of those Java projects), and many smaller
ones, all of which were built using GNU make and its
extensive macro support. Over the years I have had to
adapt the make dependency model around the Java one,
and am so far impressed with how well Ant performs in
this area (and how much more intuitive it is).

Introductions aside, I wanted to offer some thoughts
on the prospect for adding official scripting support
in Ant (I'm assuming the decision hasn't been made
yet). Although I'll make comparisons to GNU make, I by
no means believe that Ant should in any way model it
(other than properly handle dependency constraints).

1) Language Consistency: I have found the fact that
make assumes one scripting language, the Bourne shell,
a good thing. Yes, you can launch a C shell script,
Perl, or whatever from the Bourne shell, but because
there is a default/standard language people can easily
share/steal/borrow makefile components and understand
what is going on. I can also debug other's makefiles
much more effectively, and homogeneity helps grow the
collective code base. Therefore, if it is decided that
Ant should have a scripting language, I think a
default one should be selected and it be supported
exclusively. The capability for someone to go off and
plug in their favorite scripting language should be
available of coarse, but I would suggest that it be
kept out of the official release, unless natural
evolution dictates otherwise.

2) Language Necessity: This is a tough one where I'm
kinda on the fence. The more experience I gained over
the years with make, the fewer embedded scripts I
used. Yes, one must at some point invoke a command,
but this is no different than the Ant <exec> facility,
or the built-in actions. What I'm talking about is the
use of "if", "while", "case", pipes, etc... procedural
stuff. Once I realized that make is nothing more than
a simple programming language with a limited but
powerful set of operators (think Lisp), I began
thinking about build system problems differently, and
my makefiles got smaller and smaller, while becoming
more correct and powerful. I also leveraged the GNU
macros more fully, which are arguably a scripting
language unto themselves, as with the Ant

I have seen a lot of bad makefiles with lots of
scripting constructs, usually because the developer
didn't "think" in the make "paradigm" (sorry about
using that word ;-) ). However, the reason for this
isn't really the fault of the developer; without a lot
of experience, makefiles are damn hard to understand
(again, think Lisp)! And so much goes on behind the
scenes, making it very powerful, but intimidating to
the uninitiated.

View raw message