]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Java/Source/Common/build.xml
376948c46585aa4da983d06e5a667f81f80e3a41
[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 <delete file="${installLocation}/Common.jar"/>
48 <if>
49 <available file="${installLocation}/Common.jar"/>
50 <then>
51 <echo message="You must manually remove the file: ${installLocation}/Common.jar"/>
52 <echo message="Java has already loaded the file, and cannot remove it within ANT!"/>
53 </then>
54 </if>
55 </target>
56
57 <target name="install" depends="source">
58 <jar destfile="${installLocation}/Common.jar"
59 basedir="${buildDir}"
60 includes="**"
61 />
62 </target>
63 </project>