diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-11-09 11:47:35 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-11-09 11:47:35 +0000 |
commit | b303ea726e1c8ed240dad2bce54821318567eab3 (patch) | |
tree | 355db6226949afd1bfcc87d69e09a320ea9b7bb7 /BaseTools/Source/Python/GenFds/DepexSection.py | |
parent | 4c913fe619bd00861270cb0866feb34bcdc1592e (diff) | |
download | edk2-b303ea726e1c8ed240dad2bce54821318567eab3.tar.gz edk2-b303ea726e1c8ed240dad2bce54821318567eab3.tar.bz2 edk2-b303ea726e1c8ed240dad2bce54821318567eab3.zip |
Sync tool code to BuildTools project r1739.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9397 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/GenFds/DepexSection.py')
-rw-r--r-- | BaseTools/Source/Python/GenFds/DepexSection.py | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/BaseTools/Source/Python/GenFds/DepexSection.py b/BaseTools/Source/Python/GenFds/DepexSection.py index 1c8c82a72e..a0a1905dfa 100644 --- a/BaseTools/Source/Python/GenFds/DepexSection.py +++ b/BaseTools/Source/Python/GenFds/DepexSection.py @@ -80,23 +80,27 @@ class DepexSection (DepexSectionClassObject): self.Expression = self.Expression.replace(Item, ExpGuidDict[Item])
self.Expression = self.Expression.strip()
- ModuleType = (self.DepexType.startswith('PEI') and ['PEIM'] or ['DXE_DRIVER'])[0]
- if self.DepexType.startswith('SMM'):
- ModuleType = 'SMM_DRIVER'
- InputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.dpx')
- InputFile = os.path.normpath(InputFile)
+ if self.DepexType == 'PEI_DEPEX_EXP':
+ ModuleType = 'PEIM'
+ SecType = 'PEI_DEPEX'
+ elif self.DepexType == 'DXE_DEPEX_EXP':
+ ModuleType = 'DXE_DRIVER'
+ SecType = 'DXE_DEPEX'
+ elif self.DepexType == 'SMM_DEPEX_EXP':
+ ModuleType = 'DXE_SMM_DRIVER'
+ SecType = 'SMM_DEPEX'
+ else:
+ EdkLogger.error("GenFds", FORMAT_INVALID,
+ "Depex type %s is not valid for module %s" % (self.DepexType, ModuleName))
- Dpx = DependencyExpression(self.Expression, ModuleType)
- Dpx.Generate(InputFile)
+ InputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.depex')
+ InputFile = os.path.normpath(InputFile)
+ Depex = DependencyExpression(self.Expression, ModuleType)
+ Depex.Generate(InputFile)
- OutputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.depex')
- if self.DepexType.startswith('SMM'):
- OutputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.smm')
+ OutputFile = os.path.join (OutputPath, ModuleName + 'SEC' + SecNum + '.dpx')
OutputFile = os.path.normpath(OutputFile)
- SecType = (self.DepexType.startswith('PEI') and ['PEI_DEPEX'] or ['DXE_DEPEX'])[0]
- if self.DepexType.startswith('SMM'):
- SecType = 'SMM_DEPEX'
-
+
GenFdsGlobalVariable.GenerateSection(OutputFile, [InputFile], Section.Section.SectionType.get (SecType))
FileList = [OutputFile]
return FileList, self.Alignment
|