|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <!-- wrapped at 70 characters, long elements wrapped -->
- <!-- ===========================================================================
-
- Copyright (c) 2005 Contributors.
- All rights reserved.
- This program and the accompanying materials are made available
- under the terms of the Eclipse Public License v 2.0
- which accompanies this distribution and is available at
- https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
-
- Contributors:
- Wes Isberg initial implementation
-
- ============================================================================ -->
-
- <project name="aspectj-library" default="aspectjlib" basedir=".">
-
- <target name="aspectjlib" depends="compile" />
- <target name="info">
- <echo>
- This script builds the AspectJ library.
-
- Relevant targets:
- aspectjlib build library
-
- Setup:
- - Run from the doc/aspectjlib directory in your AspectJ distribution.
- The tasks in ../../lib/aspectjtools.jar are used automatically.
-
- Variants:
- - To define a variable, use the Ant -D option - e.g., on Windows:
-
- ant -f build.xml -DJAVA_HOME=c:\jdk1.3.1 -Dnorun=skip
-
- </echo>
- </target>
-
-
- <!-- ============================================================= -->
- <!-- setup and cleanup targets -->
- <!-- ============================================================= -->
-
- <target name="clean"
- depends="init"
- description="clean and create classes/jar dir, .ajesym files"
- >
- <delete quiet="on" dir="${jar.dir}" />
- <delete quiet="on">
- <fileset dir="${org.aspectj.lib.dir}"
- includes="**/*.ajesym"
- />
- </delete>
- <mkdir dir="${jar.dir}" />
- </target>
-
- <target name="init" depends="init.variables,init.taskdefs" />
-
- <target name="init.variables" description="init variables">
-
- <property name="org.aspectj.lib.dir" location="${basedir}" />
- <property name="src.dir"
- location="${org.aspectj.lib.dir}/src"
- />
-
- <!-- find AspectJ lib dir in distribution or AspectJ CVS tree -->
- <property name="aspectj.dist.lib"
- location="${basedir}/../../lib"
- />
-
- <property name="aspectj.tree.lib"
- location="${basedir}/../lib/aspectj/lib"
- />
-
- <condition property="aspectj.lib.dir"
- value="${aspectj.dist.lib}"
- >
- <available file="${aspectj.dist.lib}/aspectjtools.jar" />
- </condition>
-
- <condition property="aspectj.lib.dir"
- value="${aspectj.tree.lib}"
- >
- <available file="${aspectj.tree.lib}/aspectjtools.jar" />
- </condition>
-
- <property name="aspectjrt.jar"
- location="${aspectj.lib.dir}/aspectjrt.jar"
- />
- <property name="aspectjtools.jar"
- location="${aspectj.lib.dir}/aspectjtools.jar"
- />
- <property name="aspectjweaver.jar"
- location="${aspectj.lib.dir}/aspectjweaver.jar"
- />
-
- <property name="jar.dir"
- location="${org.aspectj.lib.dir}/jars"
- />
- <property name="aspectjlib.out.jar"
- location="${jar.dir}/aspectjlib.out.jar"
- />
-
- <available file="${aspectjtools.jar}"
- property="aspectjtools.jar.available"
- />
- <available file="${aspectjrt.jar}"
- property="aspectjrt.jar.available"
- />
-
- <property name="library.packages" value="org.aspectj.lib" />
- </target>
-
- <target name="init.taskdefs"
- depends="init.variables,
- aspectjtools.jar.available,
- aspectjrt.jar.available"
- unless="taskdefs.init"
- >
- <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties"
- >
- <classpath>
- <pathelement path="${aspectjtools.jar}" />
- </classpath>
- </taskdef>
- <property name="taskdefs.init" value="true" />
- </target>
-
- <target name="aspectjrt.jar.available"
- depends="init.variables"
- unless="aspectjrt.jar.available"
- >
- <fail message="expecting aspectjrt.jar at ${aspectjrt.jar}" />
- </target>
-
- <target name="aspectjtools.jar.available"
- depends="init.variables"
- unless="aspectjtools.jar.available"
- >
- <fail message="expecting aspectjtools.jar at ${aspectjtools.jar}"
- />
- </target>
-
- <target name="compile"
- depends="init"
- description="compile library"
- >
- <antcall target="clean" />
- <!-- can use ajc or iajc here -->
- <iajc sourceroots="${src.dir}"
- fork="true"
- forkclasspath="${aspectjtools.jar}"
- classpath="${aspectjrt.jar}"
- outjar="${aspectjlib.out.jar}"
- />
-
- </target>
-
- </project>
|