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