]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Java/Source/Common/build.xml
Standardized property name WORKSPACE and fixed cleanall messages.
[mirror_edk2.git] / Tools / Java / Source / Common / build.xml
1 <?xml version="1.0"?>
2 <!--
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 -->
12 <project name="Common" default="Common_Jar" basedir=".">
13
14 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
15 <property environment="env"/>
16 <property name="WORKSPACE" value="${env.WORKSPACE}"/>
17 <property name="buildDir" value="build"/>
18 <property name="installLocation" value="${WORKSPACE}/Tools/Jars"/>
19
20 <path id="classpath">
21 <fileset dir="${WORKSPACE}/Tools/Jars">
22 <include name="SurfaceArea.jar"/>
23 </fileset>
24 <fileset dir="${env.XMLBEANS_HOME}/lib">
25 <include name="*.jar"/>
26 </fileset>
27 <pathelement path="${env.CLASSPATH}"/>
28 </path>
29
30 <target name="Common_Jar" depends="install"/>
31
32 <target name="source">
33 <mkdir dir="${buildDir}"/>
34 <javac srcdir="." destdir="${buildDir}">
35 <classpath refid="classpath"/>
36 <compilerarg value="-Xlint"/>
37 </javac>
38 </target>
39
40 <target name="clean">
41 <delete includeemptydirs="true" failonerror="false">
42 <fileset dir="${WORKSPACE}/Tools/Java/Source/Common" includes="${buildDir}"/>
43 </delete>
44 </target>
45
46 <target name="cleanall" depends="clean">
47 <echo message="Removing Class Files and the Java Archive: Common.jar"/>
48 <delete file="${installLocation}/Common.jar"/>
49 <if>
50 <available file="${installLocation}/Common.jar"/>
51 <then>
52 <echo message="You must manually remove the file: ${installLocation}/Common.jar"/>
53 <echo message="Java has already loaded the file, and cannot remove it within ANT!"/>
54 </then>
55 </if>
56 </target>
57
58 <target name="install" depends="source">
59 <jar destfile="${installLocation}/Common.jar"
60 basedir="${buildDir}"
61 includes="**"
62 />
63 </target>
64 </project>