]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkTasks/org/tianocore/framework/tasks/VfrCompilerTask.java
Fix cleanall can't clean all genereated files. Now .i files generated by VfrCompile...
[mirror_edk2.git] / Tools / Source / FrameworkTasks / org / tianocore / framework / tasks / VfrCompilerTask.java
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