Fix cleanall can't clean all genereated files. Now .i files generated by VfrCompile...
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 18 Aug 2006 08:06:02 +0000 (08:06 +0000)
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 18 Aug 2006 08:06:02 +0000 (08:06 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1321 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Conf/BuildMacro.xml
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/FwImageTask.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/MakeDeps.java
Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/VfrCompilerTask.java
Tools/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java
Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainInfo.java

index 0b7f53757a9685ff7f6b2217f9fa51bf409bf4c9..811a4d4bd7d71b10a20e85e8141e412561c907ca 100644 (file)
@@ -649,7 +649,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
               <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.c"/>\r
             </command>\r
           </cc>\r
-          <delete file="${PLATFORM_DIR}/@{FILENAME}.i" />\r
         </sequential>\r
       </OnDependency>\r
       <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->\r
index b84ea4759517faa6c115783bfc20e4736eee119c..13df297fa616ae1729c4102161683d1c2f4d51a8 100644 (file)
@@ -25,9 +25,6 @@ import org.apache.tools.ant.taskdefs.Execute;
 import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
 import org.apache.tools.ant.types.Commandline;\r
 \r
-import org.tianocore.common.logger.EdkLog;\r
-\r
-\r
 /**\r
   FwImageTask class.\r
 \r
index 5c4de1a78ef232edfb92b151195f64d845a381ef..874e08ce2f8247aa7179c9983acbbc2bab3ddebd 100644 (file)
@@ -25,8 +25,6 @@ import java.util.Iterator;
 import java.util.List;\r
 import java.util.Set;\r
 import java.util.StringTokenizer;\r
-import java.util.regex.Matcher;\r
-import java.util.regex.Pattern;\r
 \r
 import org.apache.tools.ant.BuildException;\r
 import org.apache.tools.ant.Project;\r
@@ -47,7 +45,6 @@ public class MakeDeps extends Task {
     // private members, use set/get to access them\r
     //\r
     private static final String cmdName = "MakeDeps";\r
-    private static final String target  = "dummy";\r
     private String              includePath = null;\r
     private String              depsFile = null;\r
     private String              subDir = null;\r
index 052c24e1fce1aa1ae5c25cc76a5bde5c51b5730a..3d940cb29762e313b03c23149b03a3f1e69a060e 100644 (file)
@@ -38,6 +38,7 @@ import org.apache.tools.ant.types.Commandline;
 public class VfrCompilerTask extends Task implements EfiDefine {\r
     private String createListFile = "";\r
     private String outPutDir = "";\r
+    private File outPutFile;\r
     private String createIfrBinFile = "";\r
     private String processerArg ="";\r
     private String vfrFile = "";\r
@@ -79,6 +80,9 @@ public class VfrCompilerTask extends Task implements EfiDefine {
      @param     outPutDir   The directory name for ouput file\r
      **/\r
     public void setOutPutDir(String outPutDir) {\r
+        if (outPutDir != null) {\r
+            outPutFile = new File(outPutDir);\r
+        }\r
         this.outPutDir = " -od " + outPutDir;\r
     }\r
 \r
@@ -204,7 +208,12 @@ public class VfrCompilerTask extends Task implements EfiDefine {
 \r
             Execute runner = new Execute(streamHandler,null);\r
             runner.setAntRun(project);\r
+            \r
             runner.setCommandline(commandLine.getCommandline());\r
+            \r
+            if (outPutFile != null && outPutFile.exists()) {\r
+                runner.setWorkingDirectory(outPutFile); \r
+            }\r
 \r
             log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE);\r
             log(vfrFileName);\r
index fe7a8ce70da7475efe752f7ae7e843e41b46fb83..b8d92ed33e9c4bdbe61a6661eb886e372c42e5dc 100644 (file)
@@ -179,6 +179,18 @@ public class FrameworkBuildTask extends Task{
             fpdParserTask.setProject(getProject());\r
             fpdParserTask.setFpdFile(buildFile);\r
             fpdParserTask.execute();\r
+            \r
+            //\r
+            // If cleanall delete the Platform_build.xml\r
+            //\r
+            if (type.compareTo("cleanall") == 0) {\r
+                File platformBuildFile = \r
+                    new File(getProject().getProperty("PLATFORM_DIR") \r
+                                    + File.separatorChar \r
+                                    + getProject().getProperty("PLATFORM") \r
+                                    + "_build.xml");\r
+                platformBuildFile.deleteOnExit();\r
+            }\r
         }\r
         \r
         //\r
index 3ac976acfb3cd54aad6c11bd64507662ff25a323..5cb8e6f3e9217e005800df2cf7c0629c7a3a2947 100644 (file)
@@ -540,7 +540,6 @@ public class GlobalData {
             }\r
         }\r
         return null;\r
-\r
     }\r
 \r
     /**\r
index 4ccc4c6d915e1fae56e361008afbda1037b0d0ee..9952c0beda25cbdeb11e353095e0d77e27fca9ba 100644 (file)
@@ -328,7 +328,10 @@ public class ToolChainInfo {
        @return String\r
      **/\r
     public String toString() {\r
-        return targets + "\n" + tagnames + "\n" + archs + "\n" + commands;\r
+        return  "  TARGET :" + targets + "\n" + \r
+                "  TAGNAME:" + tagnames + "\n" + \r
+                "  ARCH   :" + archs + "\n" + \r
+                "  COMMAND:" + commands;\r
     }\r
 \r
     /**\r