Added a line to remove the Jar file in the cleanall target.
[people/mcb30/edk2.git] / edk2 / Tools / Source / FrameworkTasks / 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="FrameworkTasks" default="all">\r
13   <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
14   <property environment="env"/>\r
15   <property name="workspace" value="${env.WORKSPACE}"/>\r
16   <property name="buildDir" value="build"/>\r
17   <property name="installLocation" value="${workspace}/Tools/Jars"/>\r
18   <target name="all" depends="install"/>\r
19   <target name="source">\r
20     <mkdir dir="${buildDir}"/>\r
21     <javac srcdir="." destdir="${buildDir}">\r
22       <classpath>\r
23         <fileset dir="${workspace}/Tools/Jars">\r
24           <include name="*.jar"/>\r
25         </fileset>\r
26       </classpath>\r
27       <compilerarg value="-Xlint"/>\r
28     </javac>\r
29   </target>\r
30   <target name="clean">\r
31     <delete dir="${buildDir}"/>\r
32   </target>\r
33   <target name="cleanall">\r
34     <delete dir="${buildDir}"/>\r
35     <delete file="${installLocation}/frameworktasks.jar"/>\r
36     <if>\r
37       <available file="${installLocation}/frameworktasks.jar"/>\r
38       <then>\r
39         <echo message="You must manually remove the file: ${installLocation}/frameworktasks.jar"/>\r
40         <echo message="Java has already loaded the file, and cannot remove it within ANT!"/>\r
41       </then>\r
42     </if>\r
43   </target>\r
44   <target name="install" depends="source">\r
45     <copy file="frameworktasks.tasks" toDir="${buildDir}"/>\r
46     <jar destfile="${installLocation}/frameworktasks.jar"\r
47       basedir="${buildDir}"\r
48       includes="**"\r
49     />\r
50   </target>\r
51 </project>\r