]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/GenBuild/org/tianocore/build/pcd/action/PCDAutoGenAction.java
Refine the code for PCD tools.
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / pcd / action / PCDAutoGenAction.java
index 6d71629b6161dbab070939e58edbe4e522b12506..28bb81853e4a8eb2426e5b7026499fd939e52adf 100644 (file)
@@ -34,8 +34,9 @@ import org.tianocore.pcd.entity.UsageIdentification;
 import org.tianocore.pcd.entity.UsageInstance;\r
 import org.tianocore.pcd.exception.BuildActionException;\r
 \r
-/** This class is to manage how to generate the PCD information into Autogen.c and\r
-    Autogen.h.\r
+/**\r
+    This class is to manage how to generate the PCD information into Autogen.c\r
+    and Autogen.h.\r
 **/\r
 public class PCDAutoGenAction extends BuildAction {\r
     ///\r
@@ -113,7 +114,7 @@ public class PCDAutoGenAction extends BuildAction {
 \r
       @return the string of header file for PCD\r
     **/\r
-    public String OutputH() {\r
+    public String getHAutoGenString() {\r
         return hAutoGenString;\r
     }\r
 \r
@@ -122,7 +123,7 @@ public class PCDAutoGenAction extends BuildAction {
 \r
       @return the string of C code file for PCD\r
     **/\r
-    public String OutputC() {\r
+    public String getCAutoGenString() {\r
         return cAutoGenString;\r
     }\r
 \r
@@ -317,10 +318,6 @@ public class PCDAutoGenAction extends BuildAction {
             cAutoGenString += usageInstance.getCAutogenStr();\r
         }\r
 \r
-        //\r
-        // Work around code, In furture following code should be modified that get\r
-        // these information from Uplevel Autogen tools.\r
-        //\r
         if (pcdDriverType == CommonDefinition.PCD_DRIVER_TYPE.PEI_PCD_DRIVER) {\r
             hAutoGenString += MemoryDatabaseManager.PcdPeimHString;\r
             cAutoGenString += MemoryDatabaseManager.PcdPeimCString;\r
@@ -329,29 +326,4 @@ public class PCDAutoGenAction extends BuildAction {
             cAutoGenString += MemoryDatabaseManager.PcdDxeCString;\r
         }\r
     }\r
-\r
-    /**\r
-      Test case function\r
-\r
-      @param argv  paramter from command line\r
-    **/\r
-    public static void main(String argv[]) {\r
-\r
-        String WorkSpace = "X:/edk2";\r
-        String logFilePath = WorkSpace  + "/EdkNt32Pkg/Nt32.fpd";\r
-\r
-        //\r
-        // At first, CollectPCDAction should be invoked to collect\r
-        // all PCD information from SPD, MSA, FPD.\r
-        //\r
-        PlatformPcdPreprocessActionForBuilding collectionAction = new PlatformPcdPreprocessActionForBuilding();\r
-        GlobalData.initInfo("Tools" + File.separator + "Conf" + File.separator + "FrameworkDatabase.db",\r
-                            WorkSpace,null);\r
-\r
-        try {\r
-            collectionAction.perform(logFilePath, ActionMessage.MAX_MESSAGE_LEVEL);\r
-        } catch(Exception e) {\r
-            e.printStackTrace();\r
-        }\r
-    }\r
 }\r