]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/DepexSection.py
BaseTools: replace string constants used for module types
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / DepexSection.py
index 4ed1aa77929207e294ca7d7d809f38df7c3da5ce..d04160e890f17781c0e2596e1f53c1fcaa434e61 100644 (file)
@@ -25,6 +25,7 @@ from AutoGen.GenDepex import DependencyExpression
 from Common import EdkLogger\r
 from Common.BuildToolError import *\r
 from Common.Misc import PathClass\r
+from Common.DataType import *\r
 \r
 ## generate data section\r
 #\r
@@ -94,24 +95,24 @@ class DepexSection (DepexSectionClassObject):
             self.ExpressionProcessed = True\r
 \r
         if self.DepexType == 'PEI_DEPEX_EXP':\r
-            ModuleType = 'PEIM'\r
+            ModuleType = SUP_MODULE_PEIM\r
             SecType    = 'PEI_DEPEX'\r
         elif self.DepexType == 'DXE_DEPEX_EXP':\r
-            ModuleType = 'DXE_DRIVER'\r
+            ModuleType = SUP_MODULE_DXE_DRIVER\r
             SecType    = 'DXE_DEPEX'\r
         elif self.DepexType == 'SMM_DEPEX_EXP':\r
-            ModuleType = 'DXE_SMM_DRIVER'\r
+            ModuleType = SUP_MODULE_DXE_SMM_DRIVER\r
             SecType    = 'SMM_DEPEX'\r
         else:\r
             EdkLogger.error("GenFds", FORMAT_INVALID,\r
                             "Depex type %s is not valid for module %s" % (self.DepexType, ModuleName))\r
 \r
-        InputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.depex')\r
+        InputFile = os.path.join (OutputPath, ModuleName + SUP_MODULE_SEC + SecNum + '.depex')\r
         InputFile = os.path.normpath(InputFile)\r
         Depex = DependencyExpression(self.Expression, ModuleType)\r
         Depex.Generate(InputFile)\r
 \r
-        OutputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.dpx')\r
+        OutputFile = os.path.join (OutputPath, ModuleName + SUP_MODULE_SEC + SecNum + '.dpx')\r
         OutputFile = os.path.normpath(OutputFile)\r
 \r
         GenFdsGlobalVariable.GenerateSection(OutputFile, [InputFile], Section.Section.SectionType.get (SecType), IsMakefile=IsMakefile)\r