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