| <project name="default" default="default"> |
| <description> |
| default |
| </description> |
| <property name="destBase" location="c:\temp\example" /> |
| <property name="workspace" location="c:\eclipse3.1\dev" /> |
| <property name="coreSource" location="${workspace}${destBase} |
| \example.debug.core" /> |
| <property name="uiSource" location="${workspace}\example.debug.ui" /> |
| |
| <target name="default" description="default"> |
| |
| <macrodef name="process"> |
| <attribute name="destdir"/> |
| <attribute name="symbols"/> |
| <sequential> |
| <delete dir="@{destdir}"/> |
| <mkdir dir="@{destdir}\example.debug.core"/> |
| <mkdir dir="@{destdir}\example.debug.ui"/> |
| <preprocess destdir="@{destdir}\example.debug.core" symbols="@ |
| {symbols}"> |
| <fileset dir="${coreSource}"> |
| <exclude name="**/*.class"/> |
| </fileset> |
| </preprocess> |
| <preprocess destdir="@{destdir}\example.debug.ui" symbols="@ |
| {symbols}"> |
| <fileset dir="${uiSource}"> |
| <exclude name="**/*.class"/> |
| </fileset> |
| </preprocess> |
| </sequential> |
| </macrodef> |
| |
| <process destdir="${destBase}\exercise1.1" symbols="ex1"/> |
| <process destdir="${destBase}\exercise2.1" symbols="ex2"/> |
| |
| <property name="sameNameAsProp" value="hardToDistinguish"/> |
| |
| <property name="extendsDestBase" value="${destBase}/extension"/> |
| <echo>${extendsDestBase}</echo> |
| |
| <ant target="default"></ant> |
| <antcall target="default"></antcall> |
| </target> |
| |
| <target name="sameNameAsProp" unless="extendsDestBase" if="destBase"></target> |
| <fail unless="destBase" message="Property not set."/> |
| </project> |