39d2baf5694b9b607af884d81fff6c7b2cfba798
[mirror_edk2.git] / Tools / 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="all" 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 <target name="all" depends="install"/>
20 <target name="source">
21 <mkdir dir="${buildDir}"/>
22 <javac srcdir="." destdir="${buildDir}">
23 <compilerarg value="-Xlint"/>
24 </javac>
25 </target>
26 <target name="clean">
27 <delete dir="${buildDir}"/>
28 </target>
29 <target name="cleanall">
30 <delete dir="${buildDir}"/>
31 <delete file="${installLocation}/Common.jar"/>
32 <if>
33 <available file="${installLocation}/Common.jar"/>
34 <then>
35 <echo message="You must manually remove the file: ${installLocation}/Common.jar"/>
36 <echo message="Java has already loaded the file, and cannot remove it within ANT!"/>
37 </then>
38 </if>
39 </target>
40 <target name="install" depends="source">
41 <jar destfile="${installLocation}/Common.jar"
42 basedir="${buildDir}"
43 includes="**"
44 />
45 </target>
46 </project>