ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rousseau, John" <>
Subject Re: Expanding ${} constructs for all attributes
Date Wed, 13 Dec 2000 14:04:59 GMT

On  Dec 13, 2000, Stefan Bodewig wrote:

> Peter Donald <> wrote:
> > At 11:00  13/12/00 +0100, Stefan Bodewig wrote:
> >>Peter Donald <> wrote:
> >>> I see much much danger in evaluating depends attributes.
> >>
> >>If we were going to expand them at runtime that is, right. Actually
> >>I was proposing to expand them at parser time - should have been
> >>clearer.
> When it comes to <project>, parser time and runtime are the same. We
> need to know the basedir of a project when setting the dir attribute
> of a <fileset> for example.
> Evaluating the depends attribute at runtime would be a real pain as
> you could not calculate the dependency graph up front and might realize
> there is a cycle when you are half way through the build.
> If we evaluate them at parser time, the problem would go away, but
> that might make it less useful to those who want to expand properties
> in the depends attribute, not sure.

Evaluation at parser time would be just fine for me.

We have a bunch of stand-alone commands we create around our main
product. Not all of these commands are built/supported on all
platforms (it's native code). What I want to do is have a
targets.xml file with build rules for all targets. I then want a
master build.xml file for each platform that sets ${build.targets}
appropriately for that platform, and calls <ant> on the targets
file. The targets file main <target> then depends on
${build.targets}. This is a serious lack of functionality when
compared to make.

Without veriable expansion here, I need to duplicate quite a bit of
XML to get the functionality I want. 

I agree that runtime expansion would be problematic, and should be


John Rousseau                     
SilverStream Software                     Phone: +1 978 262 3564
2 Federal Street                            Fax: +1 978 262 3499
Billerica, MA 01821        

View raw message