Introduce a new property INCLUDE_PATHS. This property can used by customized build...
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / FileProcess.java
index dcc52094ecc9703a1bb0a679c3119ab3f44351b8..09ccd1f94cd8497fab603cfad122fc332b494cc8 100644 (file)
@@ -14,7 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 package org.tianocore.build;\r
 \r
 import java.io.File;\r
 package org.tianocore.build;\r
 \r
 import java.io.File;\r
-import java.util.Set;\r
 \r
 import org.apache.tools.ant.BuildException;\r
 import org.apache.tools.ant.Project;\r
 \r
 import org.apache.tools.ant.BuildException;\r
 import org.apache.tools.ant.Project;\r
@@ -84,7 +83,7 @@ public class FileProcess {
     ///\r
     /// Current module's include pathes\r
     ///\r
     ///\r
     /// Current module's include pathes\r
     ///\r
-    private Set<String> includes;\r
+    private String[] includes;\r
     \r
     ///\r
     /// Xml Document.\r
     \r
     ///\r
     /// Xml Document.\r
@@ -109,7 +108,7 @@ public class FileProcess {
       @param sourceFiles Modules source files\r
       @param document XML document\r
     **/\r
       @param sourceFiles Modules source files\r
       @param document XML document\r
     **/\r
-    public void init(Project project, Set<String> includes, Document document) {\r
+    public void init(Project project, String[] includes, Document document) {\r
         this.document = document;\r
         this.includes = includes;\r
         this.project = project;\r
         this.document = document;\r
         this.includes = includes;\r
         this.project = project;\r
@@ -252,11 +251,10 @@ public class FileProcess {
         ele.setAttribute("FILEPATH", sourceFilepath);\r
         ele.setAttribute("FILENAME", sourceFilename);\r
         ele.setAttribute("FILEEXT", sourceFileext.substring(1));\r
         ele.setAttribute("FILEPATH", sourceFilepath);\r
         ele.setAttribute("FILENAME", sourceFilename);\r
         ele.setAttribute("FILEEXT", sourceFileext.substring(1));\r
-        String[] includePaths = includes.toArray(new String[includes.size()]);\r
         Element includesEle = document.createElement("EXTRA.INC");\r
         Element includesEle = document.createElement("EXTRA.INC");\r
-        for (int i = 0; i < includePaths.length; i++) {\r
+        for (int i = 0; i < includes.length; i++) {\r
             Element includeEle = document.createElement("includepath");\r
             Element includeEle = document.createElement("includepath");\r
-            includeEle.setAttribute("path", project.replaceProperties(includePaths[i]));\r
+            includeEle.setAttribute("path", project.replaceProperties(includes[i]));\r
             includesEle.appendChild(includeEle);\r
         }\r
         ele.appendChild(includesEle);\r
             includesEle.appendChild(includeEle);\r
         }\r
         ele.appendChild(includesEle);\r