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