]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Added copyright&license header.
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 13 Jul 2006 10:27:03 +0000 (10:27 +0000)
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 13 Jul 2006 10:27:03 +0000 (10:27 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@973 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/GenBuild/org/tianocore/build/id/Identification.java
Tools/Source/GenBuild/org/tianocore/build/id/ModuleIdentification.java
Tools/Source/GenBuild/org/tianocore/build/id/PackageIdentification.java
Tools/Source/GenBuild/org/tianocore/build/id/PlatformIdentification.java
Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainAttribute.java
Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainConfig.java
Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainElement.java
Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainInfo.java
Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainKey.java
Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainMap.java
Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainTask.java

index abf5c1bade3aec2108da3d5286e1f5847255f481..8315358b2f3e130e393f8a5ed58f288b467280a8 100644 (file)
@@ -1,3 +1,16 @@
+/** @file\r
+This file is to define  Identification class.\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.id;\r
 \r
 import org.tianocore.build.global.GlobalData;\r
 package org.tianocore.build.id;\r
 \r
 import org.tianocore.build.global.GlobalData;\r
index 5681251ec58e148c494962994a003c2792e77364..7f146b60506b9d57de27a12bef9d2cfadac9e368 100644 (file)
@@ -1,3 +1,16 @@
+/** @file\r
+This file is to define  ModuleIdentification class.\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.id;\r
 \r
 import java.io.File;\r
 package org.tianocore.build.id;\r
 \r
 import java.io.File;\r
index 8d4994dd9b4bba306f23abfdfc32830ffe98bac9..530e4e790735b41875682a337212fec94ca44c3e 100644 (file)
@@ -1,3 +1,16 @@
+/** @file\r
+This file is to define  PackageIdentification class.\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.id;\r
 import java.io.File;\r
 \r
 package org.tianocore.build.id;\r
 import java.io.File;\r
 \r
index e1048808c9d6c35bab744c81215c7523f0c6b6b1..530ecedc86aefde61b6824a9ce68b588618825a7 100644 (file)
@@ -1,3 +1,16 @@
+/** @file\r
+This file is to define  PlatformIdentification class.\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.id;\r
 import java.io.File;\r
 \r
 package org.tianocore.build.id;\r
 import java.io.File;\r
 \r
index 7fa0bb3f7c3d4c11994caf2b4f1e42ee906dcbca..fad10da40b1ec60432f17faf16ebb3dd933825f3 100644 (file)
@@ -1,13 +1,30 @@
+/** @file\r
+This file is to define  ToolChainAttribute class.\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
 package org.tianocore.build.toolchain;\r
+\r
 /**\r
 /**\r
-* TODO: Add class description\r
-* \r
-* @author   jwang36\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
 public class ToolChainAttribute {\r
     private static int nextValue = 0;\r
 \r
-    //"NAME", "PATH", "DPATH", "SPATH", "EXT", "FAMILY", "FLAGS"\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 NAME = new ToolChainAttribute("NAME");\r
     public final static ToolChainAttribute PATH = new ToolChainAttribute("PATH");\r
     public final static ToolChainAttribute DPATH = new ToolChainAttribute("DPATH");\r
index 232046c5908944f0067b2ad5b0fcf886a0b39601..891035ca1efa1e4904350e1151b2e6aef8f534f3 100644 (file)
@@ -1,8 +1,7 @@
 /** @file\r
 /** @file\r
-  ToolChainFactory class.\r
+  ToolChainConfig class.\r
   \r
   \r
-  ToolChainFactory class parse all config files and get STD_FLAGS, GLOBAL_FLAGS,\r
-  and also command path + name.\r
+  ToolChainFactory class parse all config files and get tool chain information.\r
   \r
 Copyright (c) 2006, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
   \r
 Copyright (c) 2006, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
@@ -27,38 +26,30 @@ import java.util.Set;
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  This class parse all config files and get STD_FLAGS, GLOBAL_FLAGS, and also \r
-  command path + name.\r
\r
+  ToolChainFactory class parse all config files and get tool chain information.\r
   \r
   \r
-  @since GenBuild 1.0\r
-**/\r
+ **/\r
 public class ToolChainConfig {\r
 public class ToolChainConfig {\r
-    ///\r
-    /// list of attributes\r
-    ///\r
-    private final static String[] attributes = {"NAME", "PATH", "DPATH", "SPATH", "EXT", "FAMILY", "FLAGS"};\r
-    ///\r
-    /// elements which are used to define one type of tool\r
-    ///\r
-    private final static String[] elements = {"TARGET", "TOOLCHAIN", "ARCH", "CMD", "ATTRIBUTE" };\r
-\r
     ///\r
     /// tool chain definitions\r
     ///\r
     private ToolChainMap config = null;\r
     ///\r
     /// tool chain definitions\r
     ///\r
     private ToolChainMap config = null;\r
+    ///\r
+    /// tool chain information (how many targets, archs, etc.)\r
+    /// \r
     private ToolChainInfo info = new ToolChainInfo();\r
 \r
     /**\r
       Public construct method.\r
     private ToolChainInfo info = new ToolChainInfo();\r
 \r
     /**\r
       Public construct method.\r
-    **/\r
+     **/\r
     public ToolChainConfig () {\r
     }\r
 \r
     /**\r
       Public construct method.\r
       \r
     public ToolChainConfig () {\r
     }\r
 \r
     /**\r
       Public construct method.\r
       \r
-      @param confPath the path of config files\r
-      @param toolChainTag TOOL_CHAIN name\r
+      @param toolChainFile File object representing the tool chain configuration file\r
     **/\r
     public ToolChainConfig (File toolChainFile) {\r
         try {\r
     **/\r
     public ToolChainConfig (File toolChainFile) {\r
         try {\r
@@ -70,10 +61,13 @@ public class ToolChainConfig {
         }\r
     }\r
 \r
         }\r
     }\r
 \r
-    /// \r
-    /// \r
-    /// \r
-    public void parseToolChainDefKey (Set<ToolChainKey> toolChainDefKey) {\r
+    /**\r
+     Collect target, tool chain tag, arch and command information from key part\r
+     of configuration\r
+      \r
+     @param toolChainDefKey The set of keys in tool chain configuration\r
+     **/\r
+    private void parseToolChainDefKey (Set<ToolChainKey> toolChainDefKey) {\r
         Iterator it = toolChainDefKey.iterator();\r
         while (it.hasNext()) {\r
             ToolChainKey key = (ToolChainKey)it.next();\r
         Iterator it = toolChainDefKey.iterator();\r
         while (it.hasNext()) {\r
             ToolChainKey key = (ToolChainKey)it.next();\r
@@ -85,47 +79,29 @@ public class ToolChainConfig {
         }\r
     }\r
 \r
         }\r
     }\r
 \r
-/**\r
-     public Set<String> getTargets() {\r
-         return info.getTargets();\r
-     }\r
-\r
-     public Set<String> getTagnames() {\r
-         return info.getTagnames();\r
-     }\r
-\r
-     public Set<String> getArchs() {\r
-         return info.getArchs();\r
-     }\r
-\r
-     public Set<String> getCommands() {\r
-         return info.getCommands();\r
-     }\r
-\r
-     public String getValue(String key) {\r
-         return config.get(key);\r
-     }\r
-\r
-     public String getValue(String[] keySet) {\r
-         return config.get(keySet);\r
-     }\r
-\r
-     public String getValue(ToolChainKey key) {\r
-         return config.get(key);\r
-     }\r
- **/\r
-\r
+    /**\r
+     Return the tool chain configuration information in a Map form \r
+      \r
+     @return ToolChainMap Tool chain configurations in a ToolChainMap\r
+     **/\r
     public ToolChainMap getConfig() {\r
         return config;\r
     }\r
 \r
     public ToolChainMap getConfig() {\r
         return config;\r
     }\r
 \r
+    /**\r
+     Return the tool chain's target, arch, tag and commands information\r
+     \r
+      @return ToolChainInfo\r
+     **/\r
     public ToolChainInfo getConfigInfo() {\r
         return info;\r
     }\r
 \r
     public ToolChainInfo getConfigInfo() {\r
         return info;\r
     }\r
 \r
-    ///\r
-    /// override toString()\r
-    /// \r
+    /**\r
+     override toString()\r
+     \r
+     @return String The converted configuration string in name=value form\r
+     **/\r
     public String toString() {\r
         StringBuffer ts = new StringBuffer(10240);\r
 \r
     public String toString() {\r
         StringBuffer ts = new StringBuffer(10240);\r
 \r
@@ -133,7 +109,7 @@ public class ToolChainConfig {
         while (it.hasNext()) {\r
             ToolChainKey key = (ToolChainKey)it.next();\r
             ts.append(key.toString() + " = ");\r
         while (it.hasNext()) {\r
             ToolChainKey key = (ToolChainKey)it.next();\r
             ts.append(key.toString() + " = ");\r
-//            ts.append(config.get(key) + "\n");\r
+            ts.append(config.get(key) + "\n");\r
         }\r
 \r
         return ts.toString();\r
         }\r
 \r
         return ts.toString();\r
index a383cc8a841a881aa2200237826b759128931a7e..17c79c6fb0931b6f52c854d6f1c5a57e9dd4b2fc 100644 (file)
@@ -1,13 +1,30 @@
+/** @file\r
+This file is to define  ToolChainElement class.\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
 package org.tianocore.build.toolchain;\r
+\r
 /**\r
 /**\r
-* TODO: Add class description\r
-* \r
-* @author   jwang36\r
-*/\r
+\r
+ This class is an enumeration definition for key elements in tool chain definition\r
+ file.\r
\r
+ **/\r
 public class ToolChainElement {\r
     private static int nextValue = 0;\r
 \r
 public class ToolChainElement {\r
     private static int nextValue = 0;\r
 \r
-    //"NAME", "PATH", "DPATH", "SPATH", "EXT", "FAMILY", "FLAGS"\r
+    //\r
+    // "TARGET", "TOOLCHAIN", "ARCH", "TOOLCODE", "ATTRIBUTE"\r
+    // \r
     public final static ToolChainElement TARGET = new ToolChainElement("TARGET");\r
     public final static ToolChainElement TOOLCHAIN = new ToolChainElement("TOOLCHAIN");\r
     public final static ToolChainElement ARCH = new ToolChainElement("ARCH");\r
     public final static ToolChainElement TARGET = new ToolChainElement("TARGET");\r
     public final static ToolChainElement TOOLCHAIN = new ToolChainElement("TOOLCHAIN");\r
     public final static ToolChainElement ARCH = new ToolChainElement("ARCH");\r
index 146f6e5a131b3ee9f8aa0204ba5cbcea6e2d4cc3..7bf9dd6b8fe50628459787864c531f7ea221af52 100644 (file)
@@ -1,3 +1,16 @@
+/** @file\r
+This file is to define  ToolChainInfo class.\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
 import java.util.HashMap;\r
 package org.tianocore.build.toolchain;\r
 \r
 import java.util.HashMap;\r
@@ -6,17 +19,31 @@ import java.util.Map;
 import java.util.Set;\r
 \r
 public class ToolChainInfo {\r
 import java.util.Set;\r
 \r
 public class ToolChainInfo {\r
-\r
+    //\r
+    // build target set\r
+    // \r
     private Set<String> targets = new LinkedHashSet<String>();\r
     private Set<String> targets = new LinkedHashSet<String>();\r
-    \r
+    //\r
+    // tool chain tag name set\r
+    // \r
     private Set<String> tagnames = new LinkedHashSet<String>();\r
     private Set<String> tagnames = new LinkedHashSet<String>();\r
-    \r
+    //\r
+    // build archs set\r
+    // \r
     private Set<String> archs = new LinkedHashSet<String>();\r
     private Set<String> archs = new LinkedHashSet<String>();\r
-    \r
+    //\r
+    // build commands set\r
+    // \r
     private Set<String> commands = new LinkedHashSet<String>();\r
     private Set<String> commands = new LinkedHashSet<String>();\r
-\r
+    //\r
+    // build commands for specific tool chain\r
+    // \r
     private Map<String, Set<String>> commandMap = new HashMap<String, Set<String>>();\r
     private Map<String, Set<String>> commandMap = new HashMap<String, Set<String>>();\r
-    \r
+    /**\r
+     Add a list of targets in the form of string separated by space\r
+\r
+     @param targetList target list string\r
+     **/\r
     public void addTargets(String targetList) {\r
         //\r
         // targetList some targets separated by space " "\r
     public void addTargets(String targetList) {\r
         //\r
         // targetList some targets separated by space " "\r
@@ -27,7 +54,11 @@ public class ToolChainInfo {
         }\r
         addTargets(targetList.split(" "));\r
     }\r
         }\r
         addTargets(targetList.split(" "));\r
     }\r
-    \r
+    /**\r
+     Add a list of targets in the form of string array\r
+     \r
+     @param targetArray target string array\r
+     **/\r
     public void addTargets(String[] targetArray) {\r
         if (targetArray == null ) {\r
             return ;\r
     public void addTargets(String[] targetArray) {\r
         if (targetArray == null ) {\r
             return ;\r
@@ -36,11 +67,19 @@ public class ToolChainInfo {
             targets.add(targetArray[i]);\r
         }\r
     }\r
             targets.add(targetArray[i]);\r
         }\r
     }\r
-    \r
+    /**\r
+     Add a list of target in the form of set\r
+     \r
+     @param targetSet target string set\r
+     **/\r
     public void addTargets(Set<String> targetSet) {\r
         targets.addAll(targetSet);\r
     }\r
     public void addTargets(Set<String> targetSet) {\r
         targets.addAll(targetSet);\r
     }\r
-    \r
+    /**\r
+       Add a list of tool chain tag name in the form of string separated by space\r
+\r
+       @param tagnameList\r
+     **/\r
     public void addTagnames(String tagnameList) {\r
         //\r
         // tagnameList some tagnames separated by space " "\r
     public void addTagnames(String tagnameList) {\r
         //\r
         // tagnameList some tagnames separated by space " "\r
@@ -142,18 +181,14 @@ public class ToolChainInfo {
         result.addTargets(union(this.targets, info.targets));\r
         result.addTagnames(union(this.tagnames, info.tagnames));\r
         result.addArchs(union(this.archs, info.archs));\r
         result.addTargets(union(this.targets, info.targets));\r
         result.addTagnames(union(this.tagnames, info.tagnames));\r
         result.addArchs(union(this.archs, info.archs));\r
-        //result.addCommands(union(this.getCommands(), info.getCommands()));\r
         return result;\r
     }\r
     \r
     public ToolChainInfo intersection(ToolChainInfo info) {\r
         return result;\r
     }\r
     \r
     public ToolChainInfo intersection(ToolChainInfo info) {\r
-//        System.out.println(this + "\n" + info);\r
         ToolChainInfo result = new ToolChainInfo();\r
         result.addTargets(intersection(this.targets, info.targets));\r
         result.addTagnames(intersection(this.tagnames, info.tagnames));\r
         result.addArchs(intersection(this.archs, info.archs));\r
         ToolChainInfo result = new ToolChainInfo();\r
         result.addTargets(intersection(this.targets, info.targets));\r
         result.addTagnames(intersection(this.tagnames, info.tagnames));\r
         result.addArchs(intersection(this.archs, info.archs));\r
-        // result.addCommands(union(this.commands, info.commands));\r
-//        System.out.println("result: " + result);\r
         return result;\r
     }\r
     \r
         return result;\r
     }\r
     \r
@@ -182,7 +217,6 @@ public class ToolChainInfo {
             result.retainAll(set2);\r
         }\r
 \r
             result.retainAll(set2);\r
         }\r
 \r
-//        result.remove("*");\r
         return result;\r
     }\r
     \r
         return result;\r
     }\r
     \r
index 5504e54951fd8d55246a3adabb9416913f1a5c79..f6e1e067f898e6e47b98d5020c15e7f2e8a1ed4d 100644 (file)
@@ -9,11 +9,6 @@ http://opensource.org/licenses/bsd-license.php
 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
 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
-Module Name:\r
-  ToolChainKey.java\r
-\r
-Abstract:\r
-\r
 --*/\r
 \r
 package org.tianocore.build.toolchain;\r
 --*/\r
 \r
 package org.tianocore.build.toolchain;\r
index baddd95a98d388ef23988725c79b7dfa5cd81dfd..1bcaf0ece02a109bc305062156d0c6dad92e0808 100644 (file)
@@ -9,11 +9,6 @@ http://opensource.org/licenses/bsd-license.php
 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
 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
-Module Name:\r
-  ToolChainMap.java\r
-\r
-Abstract:\r
-\r
 --*/\r
 \r
 package org.tianocore.build.toolchain;\r
 --*/\r
 \r
 package org.tianocore.build.toolchain;\r
index 974be515f486447b378efc41f0a8e805183f3240..5af54ba7a07d1327ac25527dbd36378ccb597642 100644 (file)
@@ -50,8 +50,6 @@ public class ToolChainTask extends Task{
     **/\r
     public void execute() throws BuildException {\r
         String toolChain = getProject().getProperty(toolsEnv);\r
     **/\r
     public void execute() throws BuildException {\r
         String toolChain = getProject().getProperty(toolsEnv);\r
-//        ToolChainConfig toolchain = new ToolChainConfig(new File(confPath + File.separatorChar + toolChain));\r
-        //getProject().setProperty("TARGET", toolchain.getCurrentTarget());\r
     }\r
 \r
     /**\r
     }\r
 \r
     /**\r