]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Java/Source/Cpptasks/build.xml
Standardized property name WORKSPACE and fixed cleanall messages.
[mirror_edk2.git] / Tools / Java / Source / Cpptasks / 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="CppTasks" default="CppTasks" basedir=".">
13 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
14 <property environment="env"/>
15 <property name="WORKSPACE" value="${env.WORKSPACE}"/>
16 <property name="buildDir" value="build"/>
17 <property name="installLocation" value="${WORKSPACE}/Tools/Jars"/>
18 <target name="CppTasks" depends="install"/>
19 <target name="init">
20 <uptodate property="jar.newer" targetfile="${installLocation}/cpptasks.jar">
21 <srcfiles dir="net" includes="**"/>
22 </uptodate>
23 </target>
24 <target name="source" depends="init" unless="jar.newer">
25 <mkdir dir="${buildDir}"/>
26 <javac srcdir="net" destdir="${buildDir}" source="1.4">
27 <classpath>
28 <fileset dir="${WORKSPACE}/Tools/Jars">
29 <include name="*.jar"/>
30 </fileset>
31 </classpath>
32 </javac>
33 </target>
34 <target name="clean">
35 <delete includeemptydirs="true" failonerror="false" quiet="true">
36 <fileset dir="${WORKSPACE}/Tools/Java/Source/Cpptasks" includes="${buildDir}"/>
37 </delete>
38 </target>
39 <target name="cleanall" depends="clean">
40 <echo message="Removing Class Files and the Java Archive: cpptasks.jar"/>
41 <delete file="${installLocation}/cpptasks.jar"/>
42 <if>
43 <available file="${installLocation}/cpptasks.jar"/>
44 <then>
45 <echo message="You must manually remove the file: ${installLocation}/cpptasks.jar"/>
46 <echo message="Java has already loaded the file, and cannot remove it within ANT!"/>
47 </then>
48 </if>
49 </target>
50 <target name="install" depends="source" unless="jar.newer">
51 <copy file="cpptasks.tasks" toDir="${buildDir}"/>
52 <copy file="cpptasks.types" toDir="${buildDir}"/>
53 <jar destfile="${installLocation}/cpptasks.jar"
54 basedir="${buildDir}"
55 includes="**"
56 />
57 </target>
58 </project>