Added "source=1.4" attribute to <javac> to override the build warning message.
[mirror_edk2.git] / Tools / Source / Cpptasks / build.xml
CommitLineData
878ddf1f 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
a7828769 12<project name="CppTasks" default="CppTasks" basedir=".">\r
878ddf1f 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
a7828769 18 <target name="CppTasks" depends="install"/>\r
878ddf1f 19 <target name="init">\r
20 <uptodate property="jar.newer" targetfile="${installLocation}/cpptasks.jar">\r
21 <srcfiles dir="net" includes="**"/>\r
22 </uptodate>\r
23 </target>\r
24 <target name="source" depends="init" unless="jar.newer">\r
25 <mkdir dir="${buildDir}"/>\r
0d806227 26 <javac srcdir="net" destdir="${buildDir}" source="1.4">\r
878ddf1f 27 <classpath>\r
28 <fileset dir="${workspace}/Tools/Jars">\r
29 <include name="*.jar"/>\r
30 </fileset>\r
31 </classpath>\r
32 </javac>\r
33 </target>\r
34 <target name="clean">\r
35 <delete dir="${buildDir}"/>\r
36 </target>\r
37 <target name="cleanall">\r
38 <delete dir="${buildDir}"/>\r
617cc72b 39 <delete file="${installLocation}/cpptasks.jar"/>\r
878ddf1f 40 <if>\r
41 <available file="${installLocation}/cpptasks.jar"/>\r
42 <then>\r
43 <echo message="You must manually remove the file: ${installLocation}/cpptasks.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" unless="jar.newer">\r
49 <copy file="cpptasks.tasks" toDir="${buildDir}"/>\r
50 <copy file="cpptasks.types" toDir="${buildDir}"/>\r
51 <jar destfile="${installLocation}/cpptasks.jar"\r
52 basedir="${buildDir}"\r
53 includes="**"\r
54 />\r
55 </target>\r
56</project>\r