+ //\r
+ // Try to build apriori if necessary\r
+ //\r
+ //\r
+ // For every Target and ToolChain\r
+ //\r
+ String[] targetList = GlobalData.getToolChainInfo().getTargets();\r
+ for (int i = 0; i < targetList.length; i++){\r
+ String[] toolchainList = GlobalData.getToolChainInfo().getTagnames();\r
+ for(int j = 0; j < toolchainList.length; j++){\r
+ //\r
+ // Prepare FV_DIR\r
+ //\r
+ String ffsCommonDir = project.getProperty("BUILD_DIR") + File.separatorChar \r
+ + targetList[i] + "_" \r
+ + toolchainList[j];\r
+ File fvDir = new File(ffsCommonDir + File.separatorChar + "FV");\r
+ Element fvEle = document.createElement("var");\r
+ fvEle.setAttribute("name", "FV_DIR");\r
+ fvEle.setAttribute("value", fvDir.getPath().replaceAll("(\\\\)", "/"));\r
+ ele.appendChild(fvEle);\r
+ \r
+ Iterator<String> aprIter = aprioriType.keySet().iterator();\r
+ while (aprIter.hasNext()) {\r
+ String fvName = aprIter.next();\r
+ Element moduleEle = document.createElement("Build_Apriori");\r
+ moduleEle.setAttribute("FILENAME", fvName);\r
+ moduleEle.setAttribute("GUID", aprioriType.get(fvName));\r
+ ele.appendChild(moduleEle);\r
+ }\r
+ }\r
+ }\r
+ \r