Fixed the cleanall issue which would remove more files than we want
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 4 Jul 2006 14:52:57 +0000 (14:52 +0000)
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 4 Jul 2006 14:52:57 +0000 (14:52 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@748 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java

index b41ea211d25d35162666f49b5ba0f588cb81329d..fa94403b6b665facb753c802c6296ec748bbcc17 100644 (file)
@@ -380,9 +380,12 @@ public class PlatformBuildFileGenerator {
         ele.setAttribute("name", "cleanall");\r
 \r
         if (isUnified) {\r
         ele.setAttribute("name", "cleanall");\r
 \r
         if (isUnified) {\r
-            Element cleanAllEle = document.createElement("delete");\r
-            cleanAllEle.setAttribute("dir", project.getProperty("BUILD_DIR"));\r
-            ele.appendChild(cleanAllEle);\r
+            String[] targetList = GlobalData.getToolChainInfo().getTargets();\r
+            for (int i = 0; i < targetList.length; ++i) {\r
+                Element cleanAllEle = document.createElement("delete");\r
+                cleanAllEle.setAttribute("dir", project.getProperty("BUILD_DIR") + File.separatorChar + targetList[i]);\r
+                ele.appendChild(cleanAllEle);\r
+            }\r
         } else {\r
             Set set = outfiles.keySet();\r
             Iterator iter = set.iterator();\r
         } else {\r
             Set set = outfiles.keySet();\r
             Iterator iter = set.iterator();\r