]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/TianoTools/Pccts/dlg/build.xml
Updated to handle cygwin/gcc and moved msvc,gcc property settings to the TianoTools...
[mirror_edk2.git] / Tools / Source / TianoTools / Pccts / dlg / build.xml
index efdae432d8e8fcec5ac59e70445330719c65c79b..89e7aaa22eb9d7a17f798c85b9326d557176a606 100644 (file)
@@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 -->\r
 <project default="GenTool" basedir=".">\r
 <!--\r
-    EDK dlg Tool\r
+    EDK Pccts Tool: dlg\r
   Copyright (c) 2006, Intel Corporation\r
 -->\r
   <property name="ToolName" value="dlg"/>\r
@@ -23,51 +23,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   <property name="PACKAGE_DIR" value="${WORKSPACE}/Tools"/>\r
 \r
   <target name="init">\r
-    <echo message="The EDK Tool: ${ToolName}"/>\r
-    <if>\r
-      <equals arg1="${GCC}" arg2="cygwin"/>\r
-      <then>\r
-        <echo message="Cygwin Family"/>\r
-        <property name="ToolChain" value="gcc"/>\r
-      </then>\r
-    <elseif>\r
-      <os family="dos"/>\r
-      <then>\r
-        <echo message="Windows Family"/>\r
-        <property name="ToolChain" value="msvc"/>\r
-      </then>\r
-    </elseif>\r
-    <elseif>\r
-      <os family="unix"/>\r
-      <then>\r
-        <echo message="UNIX Family"/>\r
-        <property name="ToolChain" value="gcc"/>\r
-      </then>\r
-    </elseif>\r
-\r
-    <else>\r
-      <echo>\r
-        Unsupported Operating System\r
-        Please Contact Intel Corporation\r
-      </echo>\r
-    </else>\r
-    </if>\r
-               <if>\r
-                 <equals arg1="${ToolChain}" arg2="msvc"/>\r
-                       <then>\r
-        <property name="ext_static" value=".lib"/>\r
-        <property name="ext_dynamic" value=".dll"/>\r
-        <property name="ext_exe" value=".exe"/>\r
-                       </then>\r
-                       <elseif>\r
-                         <equals arg1="${ToolChain}" arg2="gcc"/>\r
-                               <then>\r
-          <property name="ext_static" value=".a"/>\r
-          <property name="ext_dynamic" value=".so"/>\r
-          <property name="ext_exe" value=""/>\r
-                               </then>\r
-                       </elseif>\r
-               </if>\r
                <condition property="CheckDepends">\r
                  <uptodate targetfile="${WORKSPACE}/Tools/bin/dlg.exe">\r
                          <srcfiles dir="." includes="*.c *.h *.g"/>\r
@@ -78,42 +33,61 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
                        <then>\r
                                <echo message="Executable, dlg.exe, is up to date."/>\r
                        </then>\r
+      <else>\r
+        <echo message="Building the EDK Pccts Tool: ${ToolName}"/>\r
+      </else>\r
                </if>\r
   </target>\r
 \r
   <target name="GenTool" depends="init" unless="CheckDepends">\r
-    <echo message="Building the EDK Tool: ${ToolName}"/>\r
     <if>\r
       <equals arg1="${ToolChain}" arg2="msvc"/>\r
                        <then>\r
-         <exec dir="${basedir}" executable="nmake" failonerror="TRUE">\r
+         <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="nmake" failonerror="TRUE">\r
                  <arg line="-f DlgMS.mak"/>\r
                </exec>\r
                  </then>\r
                <elseif>\r
+      <istrue value="${cygwin}"/>\r
+      <then>\r
+         <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="make" failonerror="TRUE">\r
+                 <arg line="-f makefile.cygwin"/>\r
+               </exec>\r
+      </then>\r
+    </elseif>\r
+               <elseif>\r
       <equals arg1="${ToolChain}" arg2="gcc"/>\r
                        <then>\r
-         <exec dir="${basedir}" executable="make" failonerror="TRUE">\r
+         <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="make" failonerror="TRUE">\r
                  <arg line="-f makefile"/>\r
                </exec>\r
                  </then>\r
                </elseif>\r
                </if>\r
+    <echo message="The EDK Tool: ${ToolName} build has completed!"/>\r
        </target>\r
 \r
-  <target name="clean" depends="init">\r
+  <target name="clean">\r
     <echo message="Removing Intermediate Files Only"/>  \r
     <if>\r
       <equals arg1="${ToolChain}" arg2="msvc"/>\r
                        <then>\r
-         <exec dir="${basedir}" executable="nmake" failonerror="TRUE">\r
+         <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="nmake" failonerror="TRUE">\r
                  <arg line="-f DlgMS.mak clean"/>\r
                </exec>\r
                  </then>\r
+    <elseif>\r
+      <istrue value="${cygwin}"/>\r
+      <then>\r
+         <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="make" failonerror="TRUE">\r
+                 <arg line="-f makefile.cygwin clean"/>\r
+               </exec>\r
+      </then>\r
+               </elseif>\r
                <elseif>\r
       <equals arg1="${ToolChain}" arg2="gcc"/>\r
                        <then>\r
-         <exec dir="${basedir}" executable="make" failonerror="TRUE">\r
+         <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="make" failonerror="TRUE">\r
                  <arg line="-f makefile clean"/>\r
                </exec>\r
                  </then>\r
@@ -121,24 +95,27 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
                </if>\r
   </target>\r
 \r
-  <target name="cleanall" depends="init">\r
+  <target name="cleanall">\r
     <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>  \r
     <if>\r
       <equals arg1="${ToolChain}" arg2="msvc"/>\r
                        <then>\r
-         <exec dir="${basedir}" executable="nmake" failonerror="FALSE">\r
+         <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="nmake" failonerror="FALSE">\r
                  <arg line="-f DlgMS.mak clean"/>\r
                </exec>\r
                  </then>\r
                <elseif>\r
       <equals arg1="${ToolChain}" arg2="gcc"/>\r
                        <then>\r
-         <exec dir="${basedir}" executable="make" failonerror="FALSE">\r
+         <exec dir="${PACKAGE_DIR}/Pccts/dlg" executable="make" failonerror="FALSE">\r
                  <arg line="-f makefile clean"/>\r
                </exec>\r
                  </then>\r
                </elseif>\r
                </if>\r
+    <delete failonerror="false" quiet="true" includeEmptyDirs="true">\r
+      <fileset file="${BIN_DIR}/${ToolName}${ext_exe}"/>\r
+    </delete>\r
   </target>\r
 \r
 </project>\r