]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/Pccts/antlr/build.xml
6f4a9179e28a6c970d0e9ec10082dfe1c9805f08
[mirror_edk2.git] / Tools / Source / TianoTools / 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="cpptasks.tasks"/>
20 <typedef resource="cpptasks.types"/>
21 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
22
23 <target name="init">
24 <condition property="CheckDepends">
25 <uptodate targetfile="${WORKSPACE}/Tools/bin/antlr.exe">
26 <srcfiles dir="." includes="*.c *.h *.g"/>
27 </uptodate>
28 </condition>
29 <if>
30 <equals arg1="${CheckDepends}" arg2="true"/>
31 <then>
32 <echo message="Executable, antlr.exe, is up to date."/>
33 </then>
34 <else>
35 <echo message="Building the EDK Pccts Tool: ${ToolName}"/>
36 </else>
37 </if>
38 </target>
39
40 <target name="GenTool" depends="init" unless="CheckDepends">
41 <if>
42 <equals arg1="${ToolChain}" arg2="msvc"/>
43 <then>
44 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="nmake" failonerror="TRUE">
45 <arg line="-f AntlrMS.mak"/>
46 </exec>
47 </then>
48 <elseif>
49 <istrue value="${cygwin}"/>
50 <then>
51 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">
52 <arg line="-f makefile.cygwin"/>
53 </exec>
54 </then>
55 </elseif>
56 <elseif>
57 <istrue value="${gcc}"/>
58 <then>
59 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">
60 <arg line="-f makefile"/>
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="-f AntlrMS.mak clean"/>
75 </exec>
76 </then>
77 <elseif>
78 <istrue value="${cygwin}"/>
79 <then>
80 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">
81 <arg line="-f makefile.cygwin clean"/>
82 </exec>
83 </then>
84 </elseif>
85 <elseif>
86 <istrue value="${gcc}"/>
87 <then>
88 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">
89 <arg line="-f makefile clean"/>
90 </exec>
91 </then>
92 </elseif>
93 </if>
94 </target>
95
96 <target name="cleanall">
97 <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>
98 <if>
99 <equals arg1="${ToolChain}" arg2="msvc"/>
100 <then>
101 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="nmake" failonerror="FALSE">
102 <arg line="-f AntlrMS.mak clean"/>
103 </exec>
104 </then>
105 <elseif>
106 <istrue value="${cygwin}"/>
107 <then>
108 <echo message="Building antlr with cygwin gcc"/>
109 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="FALSE">
110 <arg line="-f makefile.cygwin clean"/>
111 </exec>
112 </then>
113 </elseif>
114 <elseif>
115 <istrue value="${gcc}"/>
116 <then>
117 <echo message="Building antlr with gcc"/>
118 <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="FALSE">
119 <arg line="-f makefile clean"/>
120 </exec>
121 </then>
122 </elseif>
123 </if>
124 <delete failonerror="false" quiet="true" includeEmptyDirs="true">
125 <fileset file="${BIN_DIR}/${ToolName}${ext_exe}"/>
126 </delete>
127 </target>
128
129 </project>