Fixed EDKT498(enchance makedep tool to support asm file), EDKT500(dep file needs...
[mirror_edk2.git] / Tools / Conf / BuildMacro.xml
index a673d00..3855d09 100644 (file)
@@ -29,15 +29,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           </not>\r
         </and>\r
         <then>\r
-          <if>\r
-            <available type="file" file="${DEST_DIR_OUTPUT}/AutoGen.h.gch"/>\r
-            <then>\r
-              <makedeps DepsFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep">\r
-                <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
-                <EXTRA.INC/>\r
-              </makedeps>\r
-            </then>\r
-          </if>\r
+          <makedeps DepsFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep" \r
+                    TargetFile="${DEST_DIR_OUTPUT}/AutoGen.h.gch">\r
+            <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
+            <EXTRA.INC/>\r
+          </makedeps>\r
     \r
           <OnDependency>\r
             <sourcefiles>\r
@@ -102,20 +98,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <var name="FILE_PATH" value="@{FILEPATH}" />\r
       <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
 \r
-      <if>\r
-        <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
-        <then>\r
-          <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">\r
-            <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
-            <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
-            <EXTRA.INC/>\r
-          </makedeps>\r
-        </then>\r
-      </if>\r
+      <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"\r
+                TargetFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj">\r
+        <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
+        <EXTRA.INC/>\r
+      </makedeps>\r
 \r
       <OnDependency>\r
         <sourcefiles>\r
           <file ListFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
+          <file ListFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep"/>\r
         </sourcefiles>\r
         <targetfiles>\r
           <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
@@ -161,20 +153,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <var name="FILE_PATH" value="@{FILEPATH}" />\r
       <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
 \r
-      <if>\r
-        <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
-        <then>\r
-          <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">\r
-            <input file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
-            <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
-            <EXTRA.INC/>\r
-          </makedeps>\r
-        </then>\r
-      </if>\r
+      <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"\r
+                TargetFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj">\r
+        <input file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
+        <EXTRA.INC/>\r
+      </makedeps>\r
 \r
       <OnDependency>\r
         <sourcefiles>\r
           <file ListFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
+          <file ListFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep"/>\r
         </sourcefiles>\r
         <targetfiles>\r
           <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
@@ -304,9 +292,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <var name="FILE_PATH" value="@{FILEPATH}" />\r
       <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
 \r
+      <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"\r
+                TargetFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj">\r
+        <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
+        <EXTRA.INC.1/>\r
+      </makedeps>\r
+\r
       <OnDependency>\r
         <sourcefiles>\r
-          <file Name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
+          <file Listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
+          <file ListFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep"/>\r
         </sourcefiles>\r
         <targetfiles>\r
           <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
@@ -379,9 +374,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <var name="FILE_PATH" value="@{FILEPATH}" />\r
       <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
 \r
+      <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"\r
+                TargetFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj">\r
+        <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
+        <EXTRA.INC.1/>\r
+      </makedeps>\r
+\r
       <OnDependency>\r
         <sourcefiles>\r
-          <file Name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
+          <file Listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
+          <file ListFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep"/>\r
         </sourcefiles>\r
         <targetfiles>\r
           <file Name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
@@ -429,20 +431,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     <sequential>\r
       <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
 \r
-      <if>\r
-        <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
-        <then>\r
-          <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">\r
-            <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
-            <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
-            <EXTRA.INC.1/>\r
-          </makedeps>\r
-        </then>\r
-      </if>\r
+      <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"\r
+                TargetFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj">\r
+        <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
+        <EXTRA.INC.1/>\r
+      </makedeps>\r
 \r
       <OnDependency>\r
         <sourcefiles>\r
           <file listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
+          <file ListFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep"/>\r
         </sourcefiles>\r
         <targetfiles>\r
           <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
@@ -485,6 +483,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   </macrodef>\r
 \r
 \r
+  <!-- \r
+    Assembly the preprocessed IPF assembly code\r
+  -->\r
   <macrodef name="Build_IPF_PP_Code">\r
     <attribute name="FILEPATH"/>\r
     <attribute name="FILENAME"/>\r
@@ -515,9 +516,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   </macrodef>\r
   \r
   \r
-    <!--\r
-    Library    private HashMap map = new HashMap();\r
-    -->\r
+  <!--\r
+    Library\r
+  -->\r
   <macrodef name="Build_Library">\r
     <attribute name="FILENAME" />\r
     <attribute name="FILEEXT" default="obj"/>\r
@@ -563,10 +564,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
     <sequential>\r
       <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
+      <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"\r
+                TargetFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb">\r
+        <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
+        <EXTRA.INC/>\r
+      </makedeps>\r
 \r
       <OnDependency>\r
         <sourcefiles>\r
-          <file name="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
+          <file listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
         </sourcefiles>\r
         <targetfiles>\r
           <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.sdb"/>\r
@@ -689,20 +695,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     <sequential>\r
       <mkdir dir="${DEST_DIR_DEBUG}/@{FILEPATH}"/>\r
 \r
-      <if>\r
-        <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
-        <then>\r
-          <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">\r
-            <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
-            <input file="${DEST_DIR_DEBUG}/AutoGen.h"/>\r
-            <EXTRA.INC/>\r
-          </makedeps>\r
-        </then>\r
-      </if>\r
+      <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"\r
+                TargetFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj">\r
+        <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
+        <EXTRA.INC/>\r
+      </makedeps>\r
 \r
       <OnDependency>\r
         <sourcefiles>\r
           <file listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
+          <file ListFile="${DEST_DIR_OUTPUT}/AutoGen.h.dep"/>\r
         </sourcefiles>\r
         <targetfiles>\r
           <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
@@ -911,7 +913,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   </macrodef> \r
 \r
   <!--\r
-    DUMMY\r
+    DUMMY - for skipping the source file which should not be built\r
     -->\r
   <macrodef name="Build_DUMMY">\r
     <attribute name="FILEPATH"/>\r