]> git.proxmox.com Git - mirror_edk2.git/blame - Tools/Source/TianoTools/Pccts/dlg/build.xml
Fix some cleanall issues
[mirror_edk2.git] / Tools / Source / TianoTools / Pccts / dlg / build.xml
CommitLineData
878ddf1f 1<?xml version="1.0" ?>\r
2<!--\r
3Copyright (c) 2006, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11-->\r
12<project default="GenTool" basedir=".">\r
13<!--\r
14 EDK dlg Tool\r
15 Copyright (c) 2006, Intel Corporation\r
16-->\r
17 <property name="ToolName" value="dlg"/>\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
23 <property environment="env"/>\r
24 <property name="PACKAGE_DIR" value="${WORKSPACE}/Tools"/>\r
25\r
26 <target name="init">\r
27 <echo message="The EDK Tool: ${ToolName}"/>\r
28 <if>\r
29 <equals arg1="${GCC}" arg2="cygwin"/>\r
30 <then>\r
31 <echo message="Cygwin Family"/>\r
32 <property name="ToolChain" value="gcc"/>\r
33 </then>\r
34 <elseif>\r
35 <os family="dos"/>\r
36 <then>\r
37 <echo message="Windows Family"/>\r
38 <property name="ToolChain" value="msvc"/>\r
39 </then>\r
40 </elseif>\r
41 <elseif>\r
42 <os family="unix"/>\r
43 <then>\r
44 <echo message="UNIX Family"/>\r
45 <property name="ToolChain" value="gcc"/>\r
46 </then>\r
47 </elseif>\r
48\r
49 <else>\r
50 <echo>\r
51 Unsupported Operating System\r
52 Please Contact Intel Corporation\r
53 </echo>\r
54 </else>\r
55 </if>\r
56 <if>\r
57 <equals arg1="${ToolChain}" arg2="msvc"/>\r
58 <then>\r
59 <property name="ext_static" value=".lib"/>\r
60 <property name="ext_dynamic" value=".dll"/>\r
61 <property name="ext_exe" value=".exe"/>\r
62 </then>\r
63 <elseif>\r
64 <equals arg1="${ToolChain}" arg2="gcc"/>\r
65 <then>\r
66 <property name="ext_static" value=".a"/>\r
67 <property name="ext_dynamic" value=".so"/>\r
68 <property name="ext_exe" value=""/>\r
69 </then>\r
70 </elseif>\r
71 </if>\r
72 <condition property="CheckDepends">\r
73 <uptodate targetfile="${WORKSPACE}/Tools/bin/dlg.exe">\r
74 <srcfiles dir="." includes="*.c *.h *.g"/>\r
75 </uptodate>\r
76 </condition>\r
77 <if>\r
78 <equals arg1="${CheckDepends}" arg2="true"/>\r
79 <then>\r
80 <echo message="Executable, dlg.exe, is up to date."/>\r
81 </then>\r
82 </if>\r
83 </target>\r
84\r
85 <target name="GenTool" depends="init" unless="CheckDepends">\r
86 <echo message="Building the EDK Tool: ${ToolName}"/>\r
87 <if>\r
88 <equals arg1="${ToolChain}" arg2="msvc"/>\r
89 <then>\r
90 <exec dir="${basedir}" executable="nmake" failonerror="TRUE">\r
91 <arg line="-f DlgMS.mak"/>\r
92 </exec>\r
93 </then>\r
94 <elseif>\r
95 <equals arg1="${ToolChain}" arg2="gcc"/>\r
96 <then>\r
97 <exec dir="${basedir}" executable="make" failonerror="TRUE">\r
98 <arg line="-f makefile"/>\r
99 </exec>\r
100 </then>\r
101 </elseif>\r
102 </if>\r
103 </target>\r
104\r
105 <target name="clean" depends="init">\r
106 <echo message="Removing Intermediate Files Only"/> \r
107 <if>\r
108 <equals arg1="${ToolChain}" arg2="msvc"/>\r
109 <then>\r
110 <exec dir="${basedir}" executable="nmake" failonerror="TRUE">\r
111 <arg line="-f DlgMS.mak clean"/>\r
112 </exec>\r
113 </then>\r
114 <elseif>\r
115 <equals arg1="${ToolChain}" arg2="gcc"/>\r
116 <then>\r
117 <exec dir="${basedir}" executable="make" failonerror="TRUE">\r
118 <arg line="-f makefile clean"/>\r
119 </exec>\r
120 </then>\r
121 </elseif>\r
122 </if>\r
123 </target>\r
124\r
125 <target name="cleanall" depends="init">\r
126 <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/> \r
127 <if>\r
128 <equals arg1="${ToolChain}" arg2="msvc"/>\r
129 <then>\r
9e792382 130 <exec dir="${basedir}" executable="nmake" failonerror="FALSE">\r
878ddf1f 131 <arg line="-f DlgMS.mak distclean"/>\r
132 </exec>\r
133 </then>\r
134 <elseif>\r
135 <equals arg1="${ToolChain}" arg2="gcc"/>\r
136 <then>\r
9e792382 137 <exec dir="${basedir}" executable="make" failonerror="FALSE">\r
878ddf1f 138 <arg line="-f makefile distclean"/>\r
139 </exec>\r
140 </then>\r
141 </elseif>\r
142 </if>\r
143 </target>\r
144\r
145</project>\r