]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | <?xml version="1.0" ?>\r |
2 | <!--\r | |
3 | Copyright (c) 2006, Intel Corporation\r | |
4 | All rights reserved. This program and the accompanying materials\r | |
5 | are licensed and made available under the terms and conditions of the BSD License\r | |
6 | which accompanies this distribution. The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.php\r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | WITHOUT 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 |
878ddf1f | 43 | <arg line="-f AntlrMS.mak"/>\r |
44 | </exec>\r | |
45 | </then>\r | |
af1dd46d | 46 | <elseif>\r |
47 | <istrue value="${cygwin}"/>\r | |
48 | <then>\r | |
49 | <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">\r | |
50 | <arg line="-f makefile.cygwin"/>\r | |
51 | </exec>\r | |
52 | </then>\r | |
53 | </elseif>\r | |
54 | <elseif>\r | |
55 | <istrue value="${gcc}"/>\r | |
56 | <then>\r | |
57 | <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">\r | |
5afd4992 | 58 | <arg line="-f makefile BIN_DIR=${BIN_DIR}"/>\r |
af1dd46d | 59 | </exec>\r |
60 | </then>\r | |
61 | </elseif>\r | |
878ddf1f | 62 | </if>\r |
af1dd46d | 63 | <echo message="The EDK Tool: ${ToolName} build has completed!"/>\r |
878ddf1f | 64 | </target>\r |
65 | \r | |
af1dd46d | 66 | <target name="clean">\r |
878ddf1f | 67 | <echo message="Removing Intermediate Files Only"/> \r |
68 | <if>\r | |
69 | <equals arg1="${ToolChain}" arg2="msvc"/>\r | |
70 | <then>\r | |
af1dd46d | 71 | <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="nmake" failonerror="TRUE">\r |
878ddf1f | 72 | <arg line="-f AntlrMS.mak clean"/>\r |
73 | </exec>\r | |
74 | </then>\r | |
af1dd46d | 75 | <elseif>\r |
76 | <istrue value="${cygwin}"/>\r | |
77 | <then>\r | |
78 | <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">\r | |
79 | <arg line="-f makefile.cygwin clean"/>\r | |
80 | </exec>\r | |
81 | </then>\r | |
82 | </elseif>\r | |
878ddf1f | 83 | <elseif>\r |
af1dd46d | 84 | <istrue value="${gcc}"/>\r |
85 | <then>\r | |
86 | <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="TRUE">\r | |
878ddf1f | 87 | <arg line="-f makefile clean"/>\r |
88 | </exec>\r | |
af1dd46d | 89 | </then>\r |
878ddf1f | 90 | </elseif>\r |
91 | </if>\r | |
92 | </target>\r | |
93 | \r | |
af1dd46d | 94 | <target name="cleanall">\r |
878ddf1f | 95 | <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/> \r |
96 | <if>\r | |
97 | <equals arg1="${ToolChain}" arg2="msvc"/>\r | |
98 | <then>\r | |
af1dd46d | 99 | <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="nmake" failonerror="FALSE">\r |
466d2347 | 100 | <arg line="-f AntlrMS.mak clean"/>\r |
878ddf1f | 101 | </exec>\r |
102 | </then>\r | |
103 | <elseif>\r | |
af1dd46d | 104 | <istrue value="${cygwin}"/>\r |
878ddf1f | 105 | <then>\r |
af1dd46d | 106 | <echo message="Building antlr with cygwin gcc"/>\r |
107 | <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="FALSE">\r | |
108 | <arg line="-f makefile.cygwin clean"/>\r | |
878ddf1f | 109 | </exec>\r |
110 | </then>\r | |
111 | </elseif>\r | |
af1dd46d | 112 | <elseif>\r |
113 | <istrue value="${gcc}"/>\r | |
114 | <then>\r | |
115 | <echo message="Building antlr with gcc"/>\r | |
116 | <exec dir="${PACKAGE_DIR}/Pccts/antlr" executable="make" failonerror="FALSE">\r | |
117 | <arg line="-f makefile clean"/>\r | |
118 | </exec>\r | |
119 | </then>\r | |
120 | </elseif>\r | |
878ddf1f | 121 | </if>\r |
af1dd46d | 122 | <delete failonerror="false" quiet="true" includeEmptyDirs="true">\r |
123 | <fileset file="${BIN_DIR}/${ToolName}${ext_exe}"/>\r | |
124 | </delete>\r | |
878ddf1f | 125 | </target>\r |
126 | \r | |
127 | </project>\r |