Backup original properties to avoid property overriding message. This change is for...
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 4 Sep 2006 07:13:01 +0000 (07:13 +0000)
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 4 Sep 2006 07:13:01 +0000 (07:13 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1438 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java
Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java
Tools/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java
Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
Tools/Source/GenBuild/org/tianocore/build/global/OutputManager.java

index 07da77c2bc65a42c3014384be67a86bc635fc9a2..04cf84c04fea1a42b7679ef070c9a84729725646 100644 (file)
@@ -16,6 +16,7 @@ package org.tianocore.build;
 import java.io.BufferedReader;\r
 import java.io.File;\r
 import java.io.InputStreamReader;\r
+import java.util.Hashtable;\r
 import java.util.Iterator;\r
 import java.util.LinkedHashSet;\r
 import java.util.Map;\r
@@ -26,7 +27,6 @@ import org.apache.tools.ant.Task;
 import org.tianocore.build.fpd.FpdParserForThread;\r
 import org.tianocore.build.fpd.FpdParserTask;\r
 import org.tianocore.build.global.GlobalData;\r
-import org.tianocore.build.global.PropertyManager;\r
 import org.tianocore.build.toolchain.ConfigReader;\r
 import org.tianocore.build.toolchain.ToolChainInfo;\r
 import org.tianocore.common.definitions.ToolDefinitions;\r
@@ -74,6 +74,11 @@ public class FrameworkBuildTask extends Task{
     \r
     private Set<File> msaFiles = new LinkedHashSet<File>();\r
     \r
+    //\r
+    // This is only for none-multi-thread build to reduce overriding message\r
+    //\r
+    public static Hashtable<String, String> originalProperties = new Hashtable<String, String>();\r
+    \r
     String toolsDefFilename = ToolDefinitions.DEFAULT_TOOLS_DEF_FILE_PATH;\r
     \r
     String targetFilename = ToolDefinitions.TARGET_FILE_PATH;\r
@@ -81,17 +86,17 @@ public class FrameworkBuildTask extends Task{
     String dbFilename = ToolDefinitions.FRAMEWORK_DATABASE_FILE_PATH;\r
     \r
     String activePlatform = null;\r
-    \r
+\r
     ///\r
     /// The flag to present current is multi-thread enabled\r
     ///\r
     public static boolean multithread = false;\r
-    \r
+\r
     ///\r
     /// The concurrent thread number\r
     ///\r
     public static int MAX_CONCURRENT_THREAD_NUMBER = 1;\r
-    \r
+\r
     ///\r
     /// there are three type: all (build), clean and cleanall\r
     ///\r
@@ -147,7 +152,7 @@ public class FrameworkBuildTask extends Task{
         // Global Data initialization\r
         //\r
         File workspacePath = new File(getProject().getProperty("WORKSPACE"));\r
-        PropertyManager.setProperty(getProject(), "WORKSPACE_DIR", workspacePath.getPath().replaceAll("(\\\\)", "/"));\r
+        getProject().setProperty("WORKSPACE_DIR", workspacePath.getPath().replaceAll("(\\\\)", "/"));\r
         GlobalData.initInfo(dbFilename, workspacePath.getPath(), toolsDefFilename);\r
         \r
         //\r
@@ -228,7 +233,10 @@ public class FrameworkBuildTask extends Task{
             GenBuildTask genBuildTask = new GenBuildTask();\r
             genBuildTask.setSingleModuleBuild(true);\r
             genBuildTask.setType(type);\r
-            PropertyManager.setProperty(getProject(), "PLATFORM_FILE", activePlatform);\r
+            getProject().setProperty("PLATFORM_FILE", activePlatform);\r
+            if( !multithread) {\r
+                originalProperties.put("PLATFORM_FILE", activePlatform);\r
+            }\r
             genBuildTask.setProject(getProject());\r
             genBuildTask.setMsaFile(buildFile);\r
             genBuildTask.execute();\r
@@ -242,8 +250,7 @@ public class FrameworkBuildTask extends Task{
     **/\r
     private void backupSystemProperties() {\r
         Map<String, String> sysProperties = System.getenv();\r
-        Set<String> keys = sysProperties.keySet();\r
-        Iterator<String> iter = keys.iterator();\r
+        Iterator<String> iter = sysProperties.keySet().iterator();\r
         while (iter.hasNext()) {\r
             String name = iter.next();\r
             \r
@@ -251,9 +258,17 @@ public class FrameworkBuildTask extends Task{
             // If system environment variable is not in ANT properties, add it\r
             //\r
             if (getProject().getProperty(name) == null) {\r
-                PropertyManager.setProperty(getProject(), name, sysProperties.get(name));\r
+                getProject().setProperty(name, sysProperties.get(name));\r
             }\r
         }\r
+        \r
+        Hashtable allProperties = getProject().getProperties();\r
+        Iterator piter = allProperties.keySet().iterator();\r
+        while (piter.hasNext()) {\r
+            String name = (String)piter.next();\r
+            originalProperties.put(new String(name), new String((String)allProperties.get(name)));\r
+        }\r
+        \r
     }\r
 \r
     private File intercommuniteWithUser(){\r
index 62304774452967fc01cfedebf814e11b3e80d19e..bb9a2dfbcfb2d4cb2e8686391e2872fec8e002d2 100644 (file)
@@ -16,6 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 package org.tianocore.build;\r
 \r
 import java.io.File;\r
+import java.util.Hashtable;\r
 import java.util.Iterator;\r
 import java.util.LinkedHashSet;\r
 import java.util.List;\r
@@ -26,6 +27,8 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;\r
 \r
 import org.apache.tools.ant.BuildException;\r
+import org.apache.tools.ant.BuildListener;\r
+import org.apache.tools.ant.Project;\r
 import org.apache.tools.ant.taskdefs.Ant;\r
 import org.apache.tools.ant.taskdefs.Property;\r
 import org.apache.xmlbeans.XmlObject;\r
@@ -38,7 +41,6 @@ import org.tianocore.build.fpd.FpdParserTask;
 import org.tianocore.build.global.GenBuildLogger;\r
 import org.tianocore.build.global.GlobalData;\r
 import org.tianocore.build.global.OutputManager;\r
-import org.tianocore.build.global.PropertyManager;\r
 import org.tianocore.build.global.SurfaceAreaQuery;\r
 import org.tianocore.build.id.FpdModuleIdentification;\r
 import org.tianocore.build.id.ModuleIdentification;\r
@@ -125,22 +127,24 @@ public class GenBuildTask extends Ant {
               From module build, exception from module surface area invalid.\r
     **/\r
     public void execute() throws BuildException {\r
-       //\r
+       if (!FrameworkBuildTask.multithread) {\r
+            cleanupProperties();\r
+        }\r
+        \r
+        //\r
         // set Logger\r
         //\r
         GenBuildLogger logger = new GenBuildLogger(getProject());\r
         EdkLog.setLogLevel(getProject().getProperty("env.LOGLEVEL"));\r
         EdkLog.setLogger(logger);\r
 \r
-        PropertyManager.setProject(getProject());\r
-        PropertyManager.save();\r
         //\r
         // Enable all specified properties\r
         //\r
         Iterator<Property> iter = properties.iterator();\r
         while (iter.hasNext()) {\r
             Property item = iter.next();\r
-            PropertyManager.setProperty(item.getName(), item.getValue());\r
+            getProject().setProperty(item.getName(), item.getValue());\r
         }\r
 \r
         //\r
@@ -181,14 +185,6 @@ public class GenBuildTask extends Ant {
             //\r
             prepareSingleModuleBuild();\r
         } else {\r
-            //\r
-            // Platform build. Restore the platform related info\r
-            //\r
-            String filename = getProject().getProperty("PLATFORM_FILE");\r
-            PlatformIdentification platformId = GlobalData.getPlatform(filename);\r
-            PropertyManager.setProperty("PLATFORM_DIR", platformId.getFpdFile().getParent().replaceAll("(\\\\)", "/"));\r
-            PropertyManager.setProperty("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));\r
-\r
             String packageGuid = getProject().getProperty("PACKAGE_GUID");\r
             String packageVersion = getProject().getProperty("PACKAGE_VERSION");\r
             PackageIdentification packageId = new PackageIdentification(packageGuid, packageVersion);\r
@@ -236,7 +232,7 @@ public class GenBuildTask extends Ant {
 \r
         for (int k = 0; k < archList.length; k++) {\r
 \r
-            PropertyManager.setProperty("ARCH", archList[k]);\r
+            getProject().setProperty("ARCH", archList[k]);\r
 \r
             FpdModuleIdentification fpdModuleId = new FpdModuleIdentification(moduleId, archList[k]);\r
 \r
@@ -261,7 +257,7 @@ public class GenBuildTask extends Ant {
                 // Prepare for target related common properties\r
                 // TARGET\r
                 //\r
-                PropertyManager.setProperty("TARGET", targetList[i]);\r
+                getProject().setProperty("TARGET", targetList[i]);\r
                 String[] toolchainList = GlobalData.getToolChainInfo().getTagnames();\r
                 for(int j = 0; j < toolchainList.length; j ++){\r
                     //\r
@@ -277,7 +273,7 @@ public class GenBuildTask extends Ant {
                     // Prepare for toolchain related common properties\r
                     // TOOLCHAIN\r
                     //\r
-                    PropertyManager.setProperty("TOOLCHAIN", toolchainList[j]);\r
+                    getProject().setProperty("TOOLCHAIN", toolchainList[j]);\r
 \r
                     System.out.println("Build " + moduleId + " start >>>");\r
                     System.out.println("Target: " + targetList[i] + " Tagname: " + toolchainList[j] + " Arch: " + archList[k]);\r
@@ -308,8 +304,6 @@ public class GenBuildTask extends Ant {
                 }\r
             }\r
         }\r
-        \r
-        PropertyManager.restore();\r
     }\r
 \r
     /**\r
@@ -347,17 +341,30 @@ public class GenBuildTask extends Ant {
         FpdParserTask fpdParser = new FpdParserTask();\r
         fpdParser.setProject(getProject());\r
         fpdParser.parseFpdFile(platformId.getFpdFile());\r
-        PropertyManager.setProperty("ARCH", fpdParser.getAllArchForModule(moduleId));\r
-\r
-        //\r
-        // Prepare for Platform related common properties\r
-        // PLATFORM, PLATFORM_DIR, PLATFORM_RELATIVE_DIR\r
-        //\r
-        PropertyManager.setProperty("PLATFORM", platformId.getName());\r
-        PropertyManager.setProperty("PLATFORM_DIR", platformId.getFpdFile().getParent().replaceAll("(\\\\)", "/"));\r
-        PropertyManager.setProperty("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));\r
+        getProject().setProperty("ARCH", fpdParser.getAllArchForModule(moduleId));\r
     }\r
 \r
+    private void cleanupProperties() {\r
+        Project newProject = new Project();\r
+\r
+        Hashtable<String, String> passdownProperties = FrameworkBuildTask.originalProperties;\r
+        Iterator<String> iter = passdownProperties.keySet().iterator();\r
+        while (iter.hasNext()) {\r
+            String item = iter.next();\r
+            newProject.setProperty(item, passdownProperties.get(item));\r
+        }\r
+\r
+        newProject.setInputHandler(getProject().getInputHandler());\r
+\r
+        Iterator listenerIter = getProject().getBuildListeners().iterator();\r
+        while (listenerIter.hasNext()) {\r
+            newProject.addBuildListener((BuildListener) listenerIter.next());\r
+        }\r
+\r
+        getProject().initSubProject(newProject);\r
+\r
+        setProject(newProject);\r
+    }\r
 \r
     /**\r
       Set Module-Related information to properties.\r
@@ -370,29 +377,29 @@ public class GenBuildTask extends Ant {
         // PACKAGE, PACKAGE_GUID, PACKAGE_VERSION, PACKAGE_DIR, PACKAGE_RELATIVE_DIR\r
         //\r
         PackageIdentification packageId = moduleId.getPackage();\r
-        PropertyManager.setProperty("PACKAGE", packageId.getName());\r
-        PropertyManager.setProperty("PACKAGE_GUID", packageId.getGuid());\r
-        PropertyManager.setProperty("PACKAGE_VERSION", packageId.getVersion());\r
-        PropertyManager.setProperty("PACKAGE_DIR", packageId.getPackageDir().replaceAll("(\\\\)", "/"));\r
-        PropertyManager.setProperty("PACKAGE_RELATIVE_DIR", packageId.getPackageRelativeDir().replaceAll("(\\\\)", "/"));\r
+        getProject().setProperty("PACKAGE", packageId.getName());\r
+        getProject().setProperty("PACKAGE_GUID", packageId.getGuid());\r
+        getProject().setProperty("PACKAGE_VERSION", packageId.getVersion());\r
+        getProject().setProperty("PACKAGE_DIR", packageId.getPackageDir().replaceAll("(\\\\)", "/"));\r
+        getProject().setProperty("PACKAGE_RELATIVE_DIR", packageId.getPackageRelativeDir().replaceAll("(\\\\)", "/"));\r
 \r
         //\r
         // MODULE or BASE_NAME, GUID or FILE_GUID, VERSION, MODULE_TYPE\r
         // MODULE_DIR, MODULE_RELATIVE_DIR\r
         //\r
-        PropertyManager.setProperty("MODULE", moduleId.getName());\r
+        getProject().setProperty("MODULE", moduleId.getName());\r
         String baseName = saq.getModuleOutputFileBasename();\r
         if (baseName == null) {\r
-            PropertyManager.setProperty("BASE_NAME", moduleId.getName());\r
+            getProject().setProperty("BASE_NAME", moduleId.getName());\r
         } else {\r
-            PropertyManager.setProperty("BASE_NAME", baseName);\r
+            getProject().setProperty("BASE_NAME", baseName);\r
         }\r
-        PropertyManager.setProperty("GUID", moduleId.getGuid());\r
-        PropertyManager.setProperty("FILE_GUID", moduleId.getGuid());\r
-        PropertyManager.setProperty("VERSION", moduleId.getVersion());\r
-        PropertyManager.setProperty("MODULE_TYPE", moduleId.getModuleType());\r
-        PropertyManager.setProperty("MODULE_DIR", moduleId.getMsaFile().getParent().replaceAll("(\\\\)", "/"));\r
-        PropertyManager.setProperty("MODULE_RELATIVE_DIR", moduleId.getModuleRelativePath().replaceAll("(\\\\)", "/"));\r
+        getProject().setProperty("GUID", moduleId.getGuid());\r
+        getProject().setProperty("FILE_GUID", moduleId.getGuid());\r
+        getProject().setProperty("VERSION", moduleId.getVersion());\r
+        getProject().setProperty("MODULE_TYPE", moduleId.getModuleType());\r
+        getProject().setProperty("MODULE_DIR", moduleId.getMsaFile().getParent().replaceAll("(\\\\)", "/"));\r
+        getProject().setProperty("MODULE_RELATIVE_DIR", moduleId.getModuleRelativePath().replaceAll("(\\\\)", "/"));\r
 \r
         //\r
         // SUBSYSTEM\r
@@ -418,18 +425,18 @@ public class GenBuildTask extends Ant {
                 break ;\r
             }\r
         }\r
-        PropertyManager.setProperty("SUBSYSTEM", subsystem);\r
+        getProject().setProperty("SUBSYSTEM", subsystem);\r
 \r
         //\r
         // ENTRYPOINT\r
         //\r
         if (arch.equalsIgnoreCase("EBC")) {\r
-            PropertyManager.setProperty("ENTRYPOINT", "EfiStart");\r
+            getProject().setProperty("ENTRYPOINT", "EfiStart");\r
         } else {\r
-            PropertyManager.setProperty("ENTRYPOINT", "_ModuleEntryPoint");\r
+            getProject().setProperty("ENTRYPOINT", "_ModuleEntryPoint");\r
         }\r
 \r
-        PropertyManager.setProperty("OBJECTS", "");\r
+        getProject().setProperty("OBJECTS", "");\r
     }\r
 \r
     private void getCompilerFlags(String target, String toolchain, FpdModuleIdentification fpdModuleId) throws EdkException {\r
@@ -444,7 +451,7 @@ public class GenBuildTask extends Ant {
             key[4] = ToolDefinitions.TOOLS_DEF_ATTRIBUTE_NAME;\r
             String cmdName = GlobalData.getCommandSetting(key, fpdModuleId);\r
             File cmdFile = new File(cmdPath + File.separatorChar + cmdName);\r
-            PropertyManager.setProperty(cmd[m], cmdFile.getPath().replaceAll("(\\\\)", "/"));\r
+            getProject().setProperty(cmd[m], cmdFile.getPath().replaceAll("(\\\\)", "/"));\r
 \r
             //\r
             // set CC_FLAGS\r
@@ -454,7 +461,7 @@ public class GenBuildTask extends Ant {
             Set<String> addset = new LinkedHashSet<String>();\r
             Set<String> subset = new LinkedHashSet<String>();\r
             putFlagsToSet(addset, cmdFlags);\r
-            PropertyManager.setProperty(cmd[m] + "_FLAGS", getProject().replaceProperties(getFlags(addset, subset)));\r
+            getProject().setProperty(cmd[m] + "_FLAGS", getProject().replaceProperties(getFlags(addset, subset)));\r
 \r
             //\r
             // Set CC_EXT\r
@@ -462,9 +469,9 @@ public class GenBuildTask extends Ant {
             key[4] = ToolDefinitions.TOOLS_DEF_ATTRIBUTE_EXT;\r
             String extName = GlobalData.getCommandSetting(key, fpdModuleId);\r
             if ( extName != null && ! extName.equalsIgnoreCase("")) {\r
-                PropertyManager.setProperty(cmd[m] + "_EXT", extName);\r
+                getProject().setProperty(cmd[m] + "_EXT", extName);\r
             } else {\r
-                PropertyManager.setProperty(cmd[m] + "_EXT", "");\r
+                getProject().setProperty(cmd[m] + "_EXT", "");\r
             }\r
 \r
             //\r
@@ -473,7 +480,7 @@ public class GenBuildTask extends Ant {
             key[4] = ToolDefinitions.TOOLS_DEF_ATTRIBUTE_FAMILY;\r
             String toolChainFamily = GlobalData.getCommandSetting(key, fpdModuleId);\r
             if (toolChainFamily != null) {\r
-                PropertyManager.setProperty(cmd[m] + "_FAMILY", toolChainFamily);\r
+                getProject().setProperty(cmd[m] + "_FAMILY", toolChainFamily);\r
             }\r
 \r
             //\r
@@ -482,9 +489,9 @@ public class GenBuildTask extends Ant {
             key[4] = ToolDefinitions.TOOLS_DEF_ATTRIBUTE_SPATH;\r
             String spath = GlobalData.getCommandSetting(key, fpdModuleId);\r
             if (spath != null) {\r
-                PropertyManager.setProperty(cmd[m] + "_SPATH", spath.replaceAll("(\\\\)", "/"));\r
+                getProject().setProperty(cmd[m] + "_SPATH", spath.replaceAll("(\\\\)", "/"));\r
             } else {\r
-                PropertyManager.setProperty(cmd[m] + "_SPATH", "");\r
+                getProject().setProperty(cmd[m] + "_SPATH", "");\r
             }\r
 \r
             //\r
@@ -493,9 +500,9 @@ public class GenBuildTask extends Ant {
             key[4] = ToolDefinitions.TOOLS_DEF_ATTRIBUTE_DPATH;\r
             String dpath = GlobalData.getCommandSetting(key, fpdModuleId);\r
             if (dpath != null) {\r
-                PropertyManager.setProperty(cmd[m] + "_DPATH", dpath.replaceAll("(\\\\)", "/"));\r
+                getProject().setProperty(cmd[m] + "_DPATH", dpath.replaceAll("(\\\\)", "/"));\r
             } else {\r
-                PropertyManager.setProperty(cmd[m] + "_DPATH", "");\r
+                getProject().setProperty(cmd[m] + "_DPATH", "");\r
             }\r
         }\r
     }\r
@@ -566,7 +573,7 @@ public class GenBuildTask extends Ant {
         for (int i = 0; i < libinstances.length; i++) {\r
             propertyLibs += " " + getProject().getProperty("BIN_DIR") + File.separatorChar + libinstances[i].getName() + ".lib";\r
         }\r
-        PropertyManager.setProperty("LIBS", propertyLibs.replaceAll("(\\\\)", "/"));\r
+        getProject().setProperty("LIBS", propertyLibs.replaceAll("(\\\\)", "/"));\r
 \r
         //\r
         // Get all includepath and set to INCLUDE_PATHS\r
@@ -768,7 +775,7 @@ public class GenBuildTask extends Ant {
             includePaths.append(iter.next());\r
             includePaths.append("; ");\r
         }\r
-        PropertyManager.setProperty("INCLUDE_PATHS", getProject().replaceProperties(includePaths.toString()).replaceAll("(\\\\)", "/"));\r
+        getProject().setProperty("INCLUDE_PATHS", getProject().replaceProperties(includePaths.toString()).replaceAll("(\\\\)", "/"));\r
         \r
         return includes.toArray(new String[includes.size()]);\r
     }\r
index 122f04f3d39d4e243591f028e80af32098e3b492..548839f135384f710a07eadfca8e7f9016a1a34f 100644 (file)
@@ -31,7 +31,6 @@ import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;\r
 import org.tianocore.build.fpd.FpdParserTask;\r
 import org.tianocore.build.global.SurfaceAreaQuery;\r
-import org.tianocore.build.global.PropertyManager;\r
 import org.tianocore.build.id.FpdModuleIdentification;\r
 import org.tianocore.build.id.ModuleIdentification;\r
 import org.tianocore.build.id.PackageIdentification;\r
@@ -46,7 +45,7 @@ public class ModuleBuildFileGenerator {
     /// Pass: TARGET, TOOLCHAIN, ARCH\r
     /// PACKAGE, PACKAGE_GUID, PACKAGE_VERSION\r
     ///\r
-    String[] inheritProperties = {"ARCH", "MODULE_GUID", "MODULE_VERSION", "PLATFORM_FILE", "PACKAGE_GUID", "PACKAGE_VERSION"};\r
+    String[] inheritProperties = {"ARCH", "MODULE_GUID", "MODULE_VERSION", "PACKAGE_GUID", "PACKAGE_VERSION"};\r
 \r
     ///\r
     /// The information at the header of <em>build.xml</em>.\r
@@ -418,7 +417,7 @@ public class ModuleBuildFileGenerator {
         for (int i = 0; i < sourceFiles.length; i++) {\r
             str += " " + sourceFiles[i][1];\r
         }\r
-        PropertyManager.setProperty(project, "SOURCE_FILES", str.replaceAll("(\\\\)", "/"));\r
+        project.setProperty("SOURCE_FILES", str.replaceAll("(\\\\)", "/"));\r
     }\r
 \r
     /**\r
index c044856de3674d6620973090be2004c93c8cfe78..99e7cca94441f66bc134e4a29ba30dc479324420 100644 (file)
@@ -35,6 +35,7 @@ import org.apache.xmlbeans.XmlObject;
 import org.tianocore.common.definitions.EdkDefinitions;\r
 import org.tianocore.common.exception.EdkException;\r
 import org.tianocore.pcd.action.ActionMessage;\r
+import org.tianocore.build.FrameworkBuildTask;\r
 import org.tianocore.build.global.GlobalData;\r
 import org.tianocore.build.global.OutputManager;\r
 import org.tianocore.build.global.SurfaceAreaQuery;\r
@@ -339,6 +340,13 @@ public class FpdParserTask extends Task {
             getProject().setProperty("PLATFORM_FILE", platformId.getRelativeFpdFile().replaceAll("(\\\\)", "/"));\r
             getProject().setProperty("PLATFORM_DIR", platformId.getFpdFile().getParent().replaceAll("(\\\\)", "/"));\r
             getProject().setProperty("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));\r
+            \r
+            if( !FrameworkBuildTask.multithread) {\r
+                FrameworkBuildTask.originalProperties.put("PLATFORM", platformId.getName());\r
+                FrameworkBuildTask.originalProperties.put("PLATFORM_FILE", platformId.getRelativeFpdFile().replaceAll("(\\\\)", "/"));\r
+                FrameworkBuildTask.originalProperties.put("PLATFORM_DIR", platformId.getFpdFile().getParent().replaceAll("(\\\\)", "/"));\r
+                FrameworkBuildTask.originalProperties.put("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));\r
+            }\r
 \r
             //\r
             // Build mode. User-defined output dir.\r
index 52ffff4b6a8c32f6ed0d2bf88c61e9a833719118..3aa736d4003e0b5e086a8560f85544424d08be31 100644 (file)
@@ -16,7 +16,6 @@ package org.tianocore.build.global;
 \r
 import org.apache.tools.ant.Project;\r
 import java.io.File;\r
-import org.tianocore.build.global.PropertyManager;\r
 \r
 /**\r
   OutputManager class is used to setup output directories (BIN_DIR, DEST_DIR_OUTPUT, \r
@@ -144,11 +143,11 @@ public class OutputManager {
         //\r
         // Set properties\r
         //\r
-        PropertyManager.setProperty(project, "BUILD_DIR", buildDir.replaceAll("(\\\\)", "/"));\r
-        PropertyManager.setProperty(project, "FV_DIR", fvDir.replaceAll("(\\\\)", "/"));\r
-        PropertyManager.setProperty(project, "BIN_DIR", binDir.replaceAll("(\\\\)", "/"));\r
-        PropertyManager.setProperty(project, "DEST_DIR_DEBUG", (destDir + File.separatorChar + "DEBUG").replaceAll("(\\\\)", "/"));\r
-        PropertyManager.setProperty(project, "DEST_DIR_OUTPUT", (destDir + File.separatorChar + "OUTPUT").replaceAll("(\\\\)", "/"));\r
+        project.setProperty("BUILD_DIR", buildDir.replaceAll("(\\\\)", "/"));\r
+        project.setProperty("FV_DIR", fvDir.replaceAll("(\\\\)", "/"));\r
+        project.setProperty("BIN_DIR", binDir.replaceAll("(\\\\)", "/"));\r
+        project.setProperty("DEST_DIR_DEBUG", (destDir + File.separatorChar + "DEBUG").replaceAll("(\\\\)", "/"));\r
+        project.setProperty("DEST_DIR_OUTPUT", (destDir + File.separatorChar + "OUTPUT").replaceAll("(\\\\)", "/"));\r
         \r
         //\r
         // Create all directory if necessary\r
@@ -187,7 +186,7 @@ public class OutputManager {
         //\r
         // Set to property\r
         //\r
-        PropertyManager.setProperty(project, "BUILD_DIR", buildDir.replaceAll("(\\\\)", "/"));\r
+        project.setProperty("BUILD_DIR", buildDir.replaceAll("(\\\\)", "/"));\r
         \r
         //\r
         // Create all directory if necessary\r