]> git.proxmox.com Git - mirror_edk2.git/blob - 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
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="/NOLOGO"/>
44 <arg line="-f AntlrMS.mak"/>
45 </exec>
46 </then>
47 <elseif>
48 <istrue value="${cygwin}"/>
49 <then>
50 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">
51 <arg line="-f makefile.cygwin"/>
52 </exec>
53 </then>
54 </elseif>
55 <elseif>
56 <istrue value="${gcc}"/>
57 <then>
58 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">
59 <arg line="-s"/>
60 <arg line="-f makefile BIN_DIR=${BIN_DIR}"/>
61 </exec>
62 </then>
63 </elseif>
64 </if>
65 <echo message="The EDK Tool: ${ToolName} build has completed!"/>
66 </target>
67
68 <target name="clean">
69 <echo message="Removing Intermediate Files Only"/>
70 <if>
71 <equals arg1="${ToolChain}" arg2="msvc"/>
72 <then>
73 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="nmake" failonerror="TRUE">
74 <arg line="/C"/>
75 <arg line="/NOLOGO"/>
76 <arg line="-f AntlrMS.mak clean"/>
77 </exec>
78 </then>
79 <elseif>
80 <istrue value="${cygwin}"/>
81 <then>
82 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">
83 <arg line="-f makefile.cygwin clean"/>
84 </exec>
85 </then>
86 </elseif>
87 <elseif>
88 <istrue value="${gcc}"/>
89 <then>
90 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">
91 <arg line="-s"/>
92 <arg line="-f makefile clean"/>
93 </exec>
94 </then>
95 </elseif>
96 </if>
97 </target>
98
99 <target name="cleanall">
100 <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>
101 <if>
102 <equals arg1="${ToolChain}" arg2="msvc"/>
103 <then>
104 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="nmake" failonerror="FALSE">
105 <arg line="/C"/>
106 <arg line="/NOLOGO"/>
107 <arg line="/f AntlrMS.mak clean"/>
108 </exec>
109 </then>
110 <elseif>
111 <istrue value="${cygwin}"/>
112 <then>
113 <echo message="Building antlr with cygwin gcc"/>
114 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="FALSE">
115 <arg line="-s"/>
116 <arg line="-f makefile.cygwin clean"/>
117 </exec>
118 </then>
119 </elseif>
120 <elseif>
121 <istrue value="${gcc}"/>
122 <then>
123 <echo message="Building antlr with gcc"/>
124 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="FALSE">
125 <arg line="-s"/>
126 <arg line="-f makefile clean"/>
127 </exec>
128 </then>
129 </elseif>
130 </if>
131 <delete failonerror="false" quiet="true" includeEmptyDirs="true">
132 <fileset file="${BIN_DIR}/${ToolName}${ext_exe}"/>
133 </delete>
134 </target>
135
136 </project>