ECF Files PreviousNext

Under construction


Variables are defined in targets, using the following syntax:

<variable name="..." value="..."/>
The variables visible from a target are the variables specified in that target, recursively in its parent targets, and environment variables. Variables specified in a target override environment variables with the same name. They also override variables with the same name specified in its parent targets.

Variables in pathnames

Variables appearing in pathnames are replaced by the corresponding value if there is a variable with that name visible from the target where the pathname has been specified. It is replaced by an empty string otherwise. Note that variables visible from the project target (if different from the target where the pathname is specified) are not taken into account. Also, variables specified in a child of the target where the pathname is specified are not take into account, even if that pathname is used as part of this child target through inheritance. For example:

<target name="parent">
	<variable name="foo" value="gobo"/>
	<cluster name="foo" location="${foo}/library"/>
<target name="child" extends="parent">
	<variable name="foo" value="ise"/>
even when dealing with the target 'child', the pathname of the cluster 'foo' will be expanded to 'gobo/library' and not 'ise/library'.

Nested variables

Variables appearing in the value of other variables:

<variable name="foo" value="gobo"/>
<variable name="bar" value="${foo} is great"/>
are not expanded. So the value of the variable 'bar' is '${foo} is great', and not 'gobo is great'.

Variables in conditions

Contrary to variables appearing in pathnames, variables used in 'custom' clauses of conditions, such as 'foo' in the example below:

	<custom name="foo" value="gobo"/>
only take into account values visible from the project target, and not from the target where this condition has been specified (if different from the project target). So here this condition will be satisfied if the variable 'foo' has the value 'gobo' when viewed from the project target, even if this variable has another value in the current target.

Copyright 2008, Eric Bezault
Last Updated: 11 October 2008