]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/CCode/Source/Pccts/dlg/build.xml
Standardized property name WORKSPACE and fixed cleanall messages.
[mirror_edk2.git] / Tools / CCode / Source / Pccts / dlg / 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 Pccts Tool: dlg
15 Copyright (c) 2006, Intel Corporation
16 -->
17 <property name="ToolName" value="dlg"/>
18
19 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
20
21 <property name="PACKAGE_DIR" value="${WORKSPACE}/Tools"/>
22
23 <target name="init">
24 <condition property="CheckDepends">
25 <uptodate targetfile="${WORKSPACE}/Tools/bin/dlg.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, dlg.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/dlg" executable="nmake" failonerror="TRUE">
45 <arg line="/NOLOGO"/>
46 <arg line="-f DlgMS.mak"/>
47 </exec>
48 </then>
49 <elseif>
50 <istrue value="${cygwin}"/>
51 <then>
52 <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="make" failonerror="TRUE">
53 <arg line="-f makefile.cygwin"/>
54 </exec>
55 </then>
56 </elseif>
57 <elseif>
58 <equals arg1="${ToolChain}" arg2="gcc"/>
59 <then>
60 <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="make" failonerror="TRUE">
61 <arg line="-s"/>
62 <arg line="-f makefile BIN_DIR=${BIN_DIR}"/>
63 </exec>
64 </then>
65 </elseif>
66 </if>
67 <echo message="The EDK Tool: ${ToolName} build has completed!"/>
68 </target>
69
70 <target name="clean">
71 <echo message="Removing Intermediate Files Only"/>
72 <if>
73 <equals arg1="${ToolChain}" arg2="msvc"/>
74 <then>
75 <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="nmake" failonerror="TRUE">
76 <arg line="/C"/>
77 <arg line="/NOLOGO"/>
78 <arg line="-f DlgMS.mak clean"/>
79 </exec>
80 </then>
81 <elseif>
82 <istrue value="${cygwin}"/>
83 <then>
84 <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="make" failonerror="TRUE">
85 <arg line="-f makefile.cygwin clean"/>
86 </exec>
87 </then>
88 </elseif>
89 <elseif>
90 <equals arg1="${ToolChain}" arg2="gcc"/>
91 <then>
92 <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="make" failonerror="TRUE">
93 <arg line="-s"/>
94 <arg line="-f makefile clean"/>
95 </exec>
96 </then>
97 </elseif>
98 </if>
99 </target>
100
101 <target name="cleanall">
102 <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>
103 <if>
104 <equals arg1="${ToolChain}" arg2="msvc"/>
105 <then>
106 <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="nmake" failonerror="FALSE">
107 <arg line="/C"/>
108 <arg line="/NOLOGO"/>
109 <arg line="-f DlgMS.mak clean"/>
110 </exec>
111 </then>
112 <elseif>
113 <equals arg1="${ToolChain}" arg2="gcc"/>
114 <then>
115 <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="make" failonerror="FALSE">
116 <arg line="-s"/>
117 <arg line="-f makefile clean"/>
118 </exec>
119 </then>
120 </elseif>
121 </if>
122 <delete failonerror="false" quiet="true" includeEmptyDirs="true">
123 <fileset file="${BIN_DIR}/${ToolName}${ext_exe}"/>
124 </delete>
125 </target>
126
127 </project>