Added a line to remove the Jar file in the cleanall target.
[people/mcb30/edk2.git] / edk2 / Tools / Source / Common / build.xml
1 <?xml version="1.0"?>\r
2 <!--\r
3 Copyright (c) 2006, Intel Corporation\r
4 All rights reserved. This program and the accompanying materials\r
5 are licensed and made available under the terms and conditions of the BSD License\r
6 which accompanies this distribution.  The full text of the license may be found at\r
7 http://opensource.org/licenses/bsd-license.php\r
8 \r
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11 -->\r
12 <project name="Common" default="all" basedir=".">\r
13 \r
14   <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
15   <property environment="env"/>\r
16   <property name="WORKSPACE" value="${env.WORKSPACE}"/>\r
17   <property name="buildDir" value="build"/>\r
18   <property name="installLocation" value="${WORKSPACE}/Tools/Jars"/>\r
19   <target name="all" depends="install"/>\r
20   <target name="source">\r
21     <mkdir dir="${buildDir}"/>\r
22     <javac srcdir="." destdir="${buildDir}">\r
23       <compilerarg value="-Xlint"/>\r
24     </javac>\r
25   </target>\r
26   <target name="clean">\r
27     <delete dir="${buildDir}"/>\r
28   </target>\r
29   <target name="cleanall">\r
30     <delete dir="${buildDir}"/>\r
31     <delete file="${installLocation}/Common.jar"/>\r
32     <if>\r
33       <available file="${installLocation}/Common.jar"/>\r
34       <then>\r
35         <echo message="You must manually remove the file: ${installLocation}/Common.jar"/>\r
36         <echo message="Java has already loaded the file, and cannot remove it within ANT!"/>\r
37       </then>\r
38     </if>\r
39   </target>\r
40   <target name="install" depends="source">\r
41     <jar destfile="${installLocation}/Common.jar"\r
42       basedir="${buildDir}"\r
43       includes="**"\r
44     />\r
45   </target>\r
46 </project>\r