]> git.proxmox.com Git - mirror_edk2.git/blame - Tools/CCode/Source/Pccts/antlr/build.xml
Standardized property name WORKSPACE and fixed cleanall messages.
[mirror_edk2.git] / Tools / CCode / Source / Pccts / antlr / 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
12<project default="GenTool" basedir=".">\r
13<!--\r
14 EDK antlr Tool\r
15 Copyright (c) 2006, Intel Corporation\r
16-->\r
17 <property name="ToolName" value="antlr"/>\r
18\r
878ddf1f 19 <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
20\r
878ddf1f 21 <target name="init">\r
878ddf1f 22 <condition property="CheckDepends">\r
23 <uptodate targetfile="${WORKSPACE}/Tools/bin/antlr.exe">\r
24 <srcfiles dir="." includes="*.c *.h *.g"/>\r
25 </uptodate>\r
26 </condition>\r
27 <if>\r
28 <equals arg1="${CheckDepends}" arg2="true"/>\r
29 <then>\r
30 <echo message="Executable, antlr.exe, is up to date."/>\r
31 </then>\r
af1dd46d 32 <else>\r
33 <echo message="Building the EDK Pccts Tool: ${ToolName}"/>\r
34 </else>\r
878ddf1f 35 </if>\r
36 </target>\r
37\r
38 <target name="GenTool" depends="init" unless="CheckDepends">\r
878ddf1f 39 <if>\r
40 <equals arg1="${ToolChain}" arg2="msvc"/>\r
41 <then>\r
af1dd46d 42 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="nmake" failonerror="TRUE">\r
d7bb5113 43 <arg line="/NOLOGO"/>\r
878ddf1f 44 <arg line="-f AntlrMS.mak"/>\r
45 </exec>\r
46 </then>\r
af1dd46d 47 <elseif>\r
48 <istrue value="${cygwin}"/>\r
49 <then>\r
50 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">\r
51 <arg line="-f makefile.cygwin"/>\r
52 </exec>\r
53 </then>\r
54 </elseif>\r
55 <elseif>\r
56 <istrue value="${gcc}"/>\r
57 <then>\r
58 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">\r
d7bb5113 59 <arg line="-s"/>\r
5afd4992 60 <arg line="-f makefile BIN_DIR=${BIN_DIR}"/>\r
af1dd46d 61 </exec>\r
62 </then>\r
63 </elseif>\r
878ddf1f 64 </if>\r
af1dd46d 65 <echo message="The EDK Tool: ${ToolName} build has completed!"/>\r
878ddf1f 66 </target>\r
67\r
af1dd46d 68 <target name="clean">\r
878ddf1f 69 <echo message="Removing Intermediate Files Only"/> \r
70 <if>\r
71 <equals arg1="${ToolChain}" arg2="msvc"/>\r
72 <then>\r
af1dd46d 73 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="nmake" failonerror="TRUE">\r
d7bb5113 74 <arg line="/C"/>\r
75 <arg line="/NOLOGO"/>\r
878ddf1f 76 <arg line="-f AntlrMS.mak clean"/>\r
77 </exec>\r
78 </then>\r
af1dd46d 79 <elseif>\r
80 <istrue value="${cygwin}"/>\r
81 <then>\r
82 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">\r
83 <arg line="-f makefile.cygwin clean"/>\r
84 </exec>\r
85 </then>\r
86 </elseif>\r
878ddf1f 87 <elseif>\r
af1dd46d 88 <istrue value="${gcc}"/>\r
89 <then>\r
90 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">\r
d7bb5113 91 <arg line="-s"/>\r
878ddf1f 92 <arg line="-f makefile clean"/>\r
93 </exec>\r
af1dd46d 94 </then>\r
878ddf1f 95 </elseif>\r
96 </if>\r
97 </target>\r
98\r
af1dd46d 99 <target name="cleanall">\r
878ddf1f 100 <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/> \r
101 <if>\r
102 <equals arg1="${ToolChain}" arg2="msvc"/>\r
103 <then>\r
af1dd46d 104 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="nmake" failonerror="FALSE">\r
d7bb5113 105 <arg line="/C"/>\r
106 <arg line="/NOLOGO"/>\r
107 <arg line="/f AntlrMS.mak clean"/>\r
878ddf1f 108 </exec>\r
109 </then>\r
110 <elseif>\r
af1dd46d 111 <istrue value="${cygwin}"/>\r
878ddf1f 112 <then>\r
af1dd46d 113 <echo message="Building antlr with cygwin gcc"/>\r
114 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="FALSE">\r
d7bb5113 115 <arg line="-s"/>\r
af1dd46d 116 <arg line="-f makefile.cygwin clean"/>\r
878ddf1f 117 </exec>\r
118 </then>\r
119 </elseif>\r
af1dd46d 120 <elseif>\r
121 <istrue value="${gcc}"/>\r
122 <then>\r
123 <echo message="Building antlr with gcc"/>\r
124 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="FALSE">\r
d7bb5113 125 <arg line="-s"/>\r
af1dd46d 126 <arg line="-f makefile clean"/>\r
127 </exec>\r
128 </then>\r
129 </elseif>\r
878ddf1f 130 </if>\r
af1dd46d 131 <delete failonerror="false" quiet="true" includeEmptyDirs="true">\r
132 <fileset file="${BIN_DIR}/${ToolName}${ext_exe}"/>\r
133 </delete>\r
878ddf1f 134 </target>\r
135\r
136</project>\r