Add judgement if filepath is . or not.
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 14 Aug 2006 09:44:00 +0000 (09:44 +0000)
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 14 Aug 2006 09:44:00 +0000 (09:44 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1254 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Conf/BuildMacro.xml

index 41e2163fbf58ba9cac956ed8ae016a79baf7ceec..59dc7c2469509dbcc068c92d5424b9ac4743f159 100644 (file)
@@ -71,7 +71,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           </cc>\r
         </sequential>\r
       </OnDependency>\r
-      <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />\r
+      <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
+      <if>\r
+        <equals arg1="@{FILEPATH}" arg2="." />\r
+        <then>\r
+          <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />\r
+        </then>\r
+        <else>\r
+          <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />\r
+        </else>\r
+      </if>\r
     </sequential>\r
   </macrodef>\r
 \r
@@ -120,7 +129,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           </cc>\r
         </sequential>\r
       </OnDependency>\r
-      <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />\r
+      <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
+      <if>\r
+        <equals arg1="@{FILEPATH}" arg2="." />\r
+        <then>\r
+          <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />\r
+        </then>\r
+        <else>\r
+          <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />\r
+        </else>\r
+      </if>\r
     </sequential>\r
   </macrodef>\r
 \r
@@ -265,7 +283,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           </cc>\r
         </sequential>\r
       </OnDependency>\r
-      <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />\r
+      <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
+      <if>\r
+        <equals arg1="@{FILEPATH}" arg2="." />\r
+        <then>\r
+          <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />\r
+        </then>\r
+        <else>\r
+          <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />\r
+        </else>\r
+      </if>\r
     </sequential>\r
   </macrodef>\r
 \r
@@ -307,7 +334,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           </cc>\r
         </sequential>\r
       </OnDependency>\r
-      <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />\r
+      <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
+      <if>\r
+        <equals arg1="@{FILEPATH}" arg2="." />\r
+        <then>\r
+          <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />\r
+        </then>\r
+        <else>\r
+          <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />\r
+        </else>\r
+      </if>\r
     </sequential>\r
   </macrodef>\r
 \r
@@ -364,7 +400,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           </cc>\r
         </sequential>\r
       </OnDependency>\r
-      <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />\r
+      <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
+      <if>\r
+        <equals arg1="@{FILEPATH}" arg2="." />\r
+        <then>\r
+          <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />\r
+        </then>\r
+        <else>\r
+          <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />\r
+        </else>\r
+      </if>\r
     </sequential>\r
   </macrodef>\r
 \r
@@ -412,7 +457,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
       <OnDependency>\r
         <sourcefiles>\r
-          <file list="${OBJECTS}" />\r
+          <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}" />\r
         </sourcefiles>\r
         <targetfiles>\r
           <file name="${BIN_DIR}/@{FILENAME}.lib"/>\r
@@ -424,7 +469,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
                 outputFile="${BIN_DIR}/@{FILENAME}.lib">\r
               <argument value="${SLINK_FLAGS}"/>\r
 \r
-              <argument value="${OBJECTS}"/>\r
+              <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}"/>\r
             </command>\r
           </cc>\r
         </sequential>\r
@@ -541,7 +586,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           </cc>\r
         </sequential>\r
       </OnDependency>\r
-      <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj" />\r
+      <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
+      <if>\r
+        <equals arg1="@{FILEPATH}" arg2="." />\r
+        <then>\r
+          <var name="OBJECTS" value="${OBJECTS} @{FILENAME}Strings.obj" />\r
+        </then>\r
+        <else>\r
+          <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}Strings.obj" />\r
+        </else>\r
+      </if>\r
     </sequential>\r
   </macrodef>\r
 \r
@@ -595,7 +649,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           <delete file="${PLATFORM_DIR}/@{FILENAME}.i" />\r
         </sequential>\r
       </OnDependency>\r
-      <var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />\r
+      <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
+      <if>\r
+        <equals arg1="@{FILEPATH}" arg2="." />\r
+        <then>\r
+          <var name="OBJECTS" value="${OBJECTS} @{FILENAME}.obj" />\r
+        </then>\r
+        <else>\r
+          <var name="OBJECTS" value="${OBJECTS} @{FILEPATH}/@{FILENAME}.obj" />\r
+        </else>\r
+      </if>\r
     </sequential>\r
   </macrodef>\r
 \r
@@ -635,7 +698,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
       <OnDependency>\r
         <sourcefiles>\r
           <file list="${LIBS}"/>\r
-          <file list="${OBJECTS}"/>\r
+          <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}" />\r
         </sourcefiles>\r
         <targetfiles>\r
           <file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.dll"/>\r
@@ -647,7 +710,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
                 outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Local.lib">\r
               <argument value="${SLINK_FLAGS}"/>\r
 \r
-              <argument value="${OBJECTS}"/>\r
+              <fileset dir="${DEST_DIR_OUTPUT}" includes="${OBJECTS}"/>\r
             </command>\r
           </cc>\r
           <cc userdefine="on">\r