diff --git a/Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java b/Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java index b41ea211d2..fa94403b6b 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java +++ b/Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java @@ -380,9 +380,12 @@ public class PlatformBuildFileGenerator { ele.setAttribute("name", "cleanall"); if (isUnified) { - Element cleanAllEle = document.createElement("delete"); - cleanAllEle.setAttribute("dir", project.getProperty("BUILD_DIR")); - ele.appendChild(cleanAllEle); + String[] targetList = GlobalData.getToolChainInfo().getTargets(); + for (int i = 0; i < targetList.length; ++i) { + Element cleanAllEle = document.createElement("delete"); + cleanAllEle.setAttribute("dir", project.getProperty("BUILD_DIR") + File.separatorChar + targetList[i]); + ele.appendChild(cleanAllEle); + } } else { Set set = outfiles.keySet(); Iterator iter = set.iterator();