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