]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Sync TOOLS_DEF's attribute definitions. Since there are two copy attribute definition...
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 16 Oct 2006 07:40:59 +0000 (07:40 +0000)
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 16 Oct 2006 07:40:59 +0000 (07:40 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1755 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Java/Source/Common/org/tianocore/common/definitions/ToolDefinitions.java
Tools/Java/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
Tools/Java/Source/GenBuild/org/tianocore/build/global/GlobalData.java
Tools/Java/Source/GenBuild/org/tianocore/build/toolchain/ToolChainAttribute.java [deleted file]

index 5a1986f246baecadf41d4e6435146c18e2c7de73..dc6d9f772f6597f8a0eb3b86fa272ca4b4865399 100644 (file)
@@ -81,6 +81,8 @@ public class ToolDefinitions {
     public final static String TOOLS_DEF_ATTRIBUTE_EXT        = "EXT";\r
     public final static String TOOLS_DEF_ATTRIBUTE_FAMILY     = "FAMILY";\r
     public final static String TOOLS_DEF_ATTRIBUTE_FLAGS      = "FLAGS";\r
+    public final static String TOOLS_DEF_ATTRIBUTE_LIBPATH    = "LIBPATH";\r
+    public final static String TOOLS_DEF_ATTRIBUTE_INCLUDEPATH= "INCLUDEPATH";\r
 \r
     ///\r
     /// Tool Chain Families in the Tools Definition file\r
index 2b1f30fa0d34b738b6d868a9428ba165fbad1f94..86fb256e95afff47e82bcdad9e0fefd889952af0 100644 (file)
@@ -35,6 +35,7 @@ import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;\r
 \r
 import org.tianocore.common.definitions.EdkDefinitions;\r
+import org.tianocore.common.definitions.ToolDefinitions;\r
 import org.tianocore.common.exception.EdkException;\r
 import org.tianocore.common.logger.EdkLog;\r
 import org.tianocore.build.FrameworkBuildTask;\r
@@ -46,7 +47,6 @@ import org.tianocore.build.id.ModuleIdentification;
 import org.tianocore.build.id.PackageIdentification;\r
 import org.tianocore.build.id.PlatformIdentification;\r
 import org.tianocore.build.pcd.action.PlatformPcdPreprocessActionForBuilding;\r
-import org.tianocore.build.toolchain.ToolChainAttribute;\r
 import org.tianocore.build.toolchain.ToolChainElement;\r
 import org.tianocore.build.toolchain.ToolChainMap;\r
 import org.w3c.dom.NamedNodeMap;\r
@@ -545,7 +545,7 @@ public class FpdParserTask extends Task {
             if (flagString == null) {\r
                 flagString = "";\r
             }\r
-            options[i][flagIndex] = ToolChainAttribute.FLAGS + "";\r
+            options[i][flagIndex] = ToolDefinitions.TOOLS_DEF_ATTRIBUTE_FLAGS;\r
             map.put(options[i], flagString.trim());\r
         }\r
 \r
index 9138036c7885b5742fd6929de0356bd4a2693167..310381bc14b527f16b8c7bd871dc7269dd1803e9 100644 (file)
@@ -30,6 +30,7 @@ import java.util.regex.Pattern;
 import org.apache.xmlbeans.XmlException;\r
 import org.apache.xmlbeans.XmlObject;\r
 \r
+import org.tianocore.common.definitions.ToolDefinitions;\r
 import org.tianocore.common.exception.EdkException;\r
 import org.tianocore.common.logger.EdkLog;\r
 import org.tianocore.pcd.entity.MemoryDatabaseManager;\r
@@ -41,7 +42,6 @@ import org.tianocore.build.id.FpdModuleIdentification;
 import org.tianocore.build.id.ModuleIdentification;\r
 import org.tianocore.build.id.PackageIdentification;\r
 import org.tianocore.build.id.PlatformIdentification;\r
-import org.tianocore.build.toolchain.ToolChainAttribute;\r
 import org.tianocore.build.toolchain.ToolChainConfig;\r
 import org.tianocore.build.toolchain.ToolChainElement;\r
 import org.tianocore.build.toolchain.ToolChainInfo;\r
@@ -720,7 +720,7 @@ public class GlobalData {
         String[] commands = getToolChainInfo().getCommands();\r
 \r
         for (int i = 0; i < commands.length; ++i) {\r
-            String cmdName = toolsDef.getConfig().get(new String[] {target, toolchain, arch, commands[i], ToolChainAttribute.NAME.toString()});\r
+            String cmdName = toolsDef.getConfig().get(new String[] {target, toolchain, arch, commands[i], ToolDefinitions.TOOLS_DEF_ATTRIBUTE_NAME});\r
             if (cmdName != null && cmdName.length() != 0) {\r
                 return true;\r
             }\r
@@ -741,7 +741,7 @@ public class GlobalData {
         if (setting == null) {\r
             setting = "";\r
         }\r
-        if (!commandDescription[ToolChainElement.ATTRIBUTE.value].equals(ToolChainAttribute.FLAGS.toString())) {\r
+        if (!commandDescription[ToolChainElement.ATTRIBUTE.value].equals(ToolDefinitions.TOOLS_DEF_ATTRIBUTE_FLAGS)) {\r
             return setting;\r
         }\r
 \r
@@ -752,10 +752,10 @@ public class GlobalData {
         ToolChainMap option = null;\r
         ToolChainKey toolChainFamilyKey = new ToolChainKey(commandDescription);\r
 \r
-        toolChainFamilyKey.setKey(ToolChainAttribute.FAMILY.toString(), ToolChainElement.ATTRIBUTE.value);\r
+        toolChainFamilyKey.setKey(ToolDefinitions.TOOLS_DEF_ATTRIBUTE_FAMILY, ToolChainElement.ATTRIBUTE.value);\r
         String family = toolChainConfig.get(toolChainFamilyKey);\r
         toolChainFamilyKey.setKey(family, ToolChainElement.TOOLCHAIN.value);\r
-        toolChainFamilyKey.setKey(ToolChainAttribute.FLAGS.toString(), ToolChainElement.ATTRIBUTE.value);\r
+        toolChainFamilyKey.setKey(ToolDefinitions.TOOLS_DEF_ATTRIBUTE_FLAGS, ToolChainElement.ATTRIBUTE.value);\r
 \r
         //\r
         // Platform's tool chain family option\r
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/toolchain/ToolChainAttribute.java b/Tools/Java/Source/GenBuild/org/tianocore/build/toolchain/ToolChainAttribute.java
deleted file mode 100644 (file)
index 491d37c..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/** @file\r
-ToolChainAttribute class\r
-\r
-This file is to define enumeration value for tool chain attribute names.\r
-\r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-**/\r
-\r
-package org.tianocore.build.toolchain;\r
-\r
-/**\r
-\r
- ToolChainAttribute is used to define the enumeration value for the attributes\r
- used in tool chain definition file. \r
-\r
- **/\r
-public class ToolChainAttribute {\r
-    private static int nextValue = 0;\r
-\r
-    ///\r
-    /// "NAME", "PATH", "DPATH", "SPATH", "EXT", "FAMILY", "FLAGS"\r
-    /// \r
-    public final static ToolChainAttribute NAME = new ToolChainAttribute("NAME");\r
-    public final static ToolChainAttribute PATH = new ToolChainAttribute("PATH");\r
-    public final static ToolChainAttribute DPATH = new ToolChainAttribute("DPATH");\r
-    public final static ToolChainAttribute SPATH = new ToolChainAttribute("SPATH");\r
-    public final static ToolChainAttribute EXT = new ToolChainAttribute("EXT");\r
-    public final static ToolChainAttribute FAMILY = new ToolChainAttribute("FAMILY");\r
-    public final static ToolChainAttribute FLAGS = new ToolChainAttribute("FLAGS");\r
-\r
-    private final String name;\r
-    public final int value = nextValue++;\r
-\r
-    /**\r
-     * Default constructor\r
-     */\r
-    private ToolChainAttribute(String name) {\r
-        this.name = name;\r
-    }\r
-\r
-    public String toString() {\r
-        return name;\r
-    }\r
-}\r
-\r