2 # This file is used to define each component of DEC file in light mode
4 # Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
5 # This program and the accompanying materials
6 # are licensed and made available under the terms and conditions of the BSD License
7 # which accompanies this distribution. The full text of the license may be found at
8 # http://opensource.org/licenses/bsd-license.php
10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 from Misc
import GetFiles
20 from DataType
import *
21 from CommonDataClass
.PackageClass
import *
22 from CommonDataClass
import CommonClass
23 from BuildToolError
import *
27 Section
= {TAB_UNKNOWN
.upper() : MODEL_UNKNOWN
,
28 TAB_DEC_DEFINES
.upper() : MODEL_META_DATA_HEADER
,
29 TAB_INCLUDES
.upper() : MODEL_EFI_INCLUDE
,
30 TAB_LIBRARY_CLASSES
.upper() : MODEL_EFI_LIBRARY_CLASS
,
31 TAB_COMPONENTS
.upper() : MODEL_META_DATA_COMPONENT
,
32 TAB_GUIDS
.upper() : MODEL_EFI_GUID
,
33 TAB_PROTOCOLS
.upper() : MODEL_EFI_PROTOCOL
,
34 TAB_PPIS
.upper() : MODEL_EFI_PPI
,
35 TAB_PCDS_FIXED_AT_BUILD_NULL
.upper() : MODEL_PCD_FIXED_AT_BUILD
,
36 TAB_PCDS_PATCHABLE_IN_MODULE_NULL
.upper() : MODEL_PCD_PATCHABLE_IN_MODULE
,
37 TAB_PCDS_FEATURE_FLAG_NULL
.upper() : MODEL_PCD_FEATURE_FLAG
,
38 TAB_PCDS_DYNAMIC_EX_NULL
.upper() : MODEL_PCD_DYNAMIC_EX
,
39 TAB_PCDS_DYNAMIC_NULL
.upper() : MODEL_PCD_DYNAMIC
,
40 TAB_USER_EXTENSIONS
.upper() : MODEL_META_DATA_USER_EXTENSION
45 # This class defined basic Dec object which is used by inheriting
47 # @param object: Inherited from object class
49 class DecObject(object):
55 # This class defined the structure used in Dec object
57 # @param DecObject: Inherited from DecObject class
58 # @param Filename: Input value for Filename of Dec file, default is None
59 # @param IsMergeAllArches: Input value for IsMergeAllArches
60 # True is to merge all arches
61 # Fales is not to merge all arches
63 # @param IsToPackage: Input value for IsToPackage
64 # True is to transfer to PackageObject automatically
65 # False is not to transfer to PackageObject automatically
67 # @param WorkspaceDir: Input value for current workspace directory, default is None
69 # @var Identification: To store value for Identification, it is a structure as Identification
70 # @var Defines: To store value for Defines, it is a structure as DecDefines
71 # @var UserExtensions: To store value for UserExtensions
72 # @var Package: To store value for Package, it is a structure as PackageClass
73 # @var WorkspaceDir: To store value for WorkspaceDir
74 # @var Contents: To store value for Contents, it is a structure as DecContents
75 # @var KeyList: To store value for KeyList, a list for all Keys used in Dec
78 def __init__(self
, Filename
= None, IsToPackage
= False, WorkspaceDir
= None, AllGuidVersionDict
= None, SupArchList
= DataType
.ARCH_LIST
):
79 self
.Identification
= IdentificationClass()
80 self
.Package
= PackageClass()
81 self
.UserExtensions
= ''
82 self
.WorkspaceDir
= WorkspaceDir
83 self
.SupArchList
= SupArchList
84 self
.AllGuidVersionDict
= {}
85 if AllGuidVersionDict
:
86 self
.AllGuidVersionDict
= AllGuidVersionDict
89 TAB_INCLUDES
, TAB_GUIDS
, TAB_PROTOCOLS
, TAB_PPIS
, TAB_LIBRARY_CLASSES
, \
90 TAB_PCDS_FIXED_AT_BUILD_NULL
, TAB_PCDS_PATCHABLE_IN_MODULE_NULL
, TAB_PCDS_FEATURE_FLAG_NULL
, \
91 TAB_PCDS_DYNAMIC_NULL
, TAB_PCDS_DYNAMIC_EX_NULL
, TAB_DEC_DEFINES
93 # Upper all KEYs to ignore case sensitive when parsing
94 self
.KeyList
= map(lambda c
: c
.upper(), self
.KeyList
)
98 for Key
in self
.KeyList
:
99 self
.RecordSet
[Section
[Key
]] = []
102 self
.SectionHeaderCommentDict
= {}
104 # Load Dec file if filename is not None
106 self
.LoadDecFile(Filename
)
108 # Transfer to Package Object if IsToPackage is True
114 # Load the file if it exists
116 # @param Filename: Input value for filename of Dec file
118 def LoadDecFile(self
, Filename
):
119 # Insert a record for file
120 Filename
= NormPath(Filename
)
121 self
.Identification
.FullPath
= Filename
122 (self
.Identification
.RelaPath
, self
.Identification
.FileName
) = os
.path
.split(Filename
)
123 if self
.Identification
.FullPath
.find(self
.WorkspaceDir
) > -1:
124 self
.Identification
.PackagePath
= os
.path
.dirname(self
.Identification
.FullPath
[len(self
.WorkspaceDir
) + 1:])
127 IfDefList
, SectionItemList
, CurrentSection
, ArchList
, ThirdList
, IncludeFiles
= \
128 [], [], TAB_UNKNOWN
, [], [], []
132 IsFindBlockComment
= False
135 for Line
in open(Filename
, 'r'):
137 # Remove comment block
138 if Line
.find(TAB_COMMENT_R8_START
) > -1:
139 ReservedLine
= GetSplitValueList(Line
, TAB_COMMENT_R8_START
, 1)[0]
140 if ReservedLine
.strip().startswith(TAB_COMMENT_SPLIT
):
141 Comment
= Comment
+ Line
.strip() + '\n'
144 Comment
= Comment
+ Line
[len(ReservedLine
):] + '\n'
145 IsFindBlockComment
= True
148 if Line
.find(TAB_COMMENT_R8_END
) > -1:
149 Comment
= Comment
+ Line
[:Line
.find(TAB_COMMENT_R8_END
) + len(TAB_COMMENT_R8_END
)] + '\n'
150 Line
= ReservedLine
+ GetSplitValueList(Line
, TAB_COMMENT_R8_END
, 1)[1]
152 IsFindBlockComment
= False
153 if IsFindBlockComment
:
154 Comment
= Comment
+ Line
.strip() + '\n'
157 # Remove comments at tail and remove spaces again
158 if Line
.strip().startswith(TAB_COMMENT_SPLIT
) or Line
.strip().startswith('--/'):
159 Comment
= Comment
+ Line
.strip() + '\n'
160 Line
= CleanString(Line
)
164 ## Find a new section tab
165 # First insert previous section items
166 # And then parse the content of the new section
168 if Line
.startswith(TAB_SECTION_START
) and Line
.endswith(TAB_SECTION_END
):
169 # Insert items data of previous section
170 Model
= Section
[CurrentSection
.upper()]
171 InsertSectionItems(Model
, CurrentSection
, SectionItemList
, ArchList
, ThirdList
, self
.RecordSet
)
172 # Parse the new section
178 LineList
= GetSplitValueList(Line
[len(TAB_SECTION_START
):len(Line
) - len(TAB_SECTION_END
)], TAB_COMMA_SPLIT
)
179 for Item
in LineList
:
180 ItemList
= GetSplitValueList(Item
, TAB_SPLIT
)
181 if CurrentSection
== '':
182 CurrentSection
= ItemList
[0]
184 if CurrentSection
!= ItemList
[0]:
185 EdkLogger
.error("Parser", PARSER_ERROR
, "Different section names '%s' and '%s' are found in one section definition, this is not allowed." % (CurrentSection
, ItemList
[0]), File
=Filename
, Line
=LineNo
, RaiseError
= EdkLogger
.IsRaiseError
)
186 if CurrentSection
.upper() not in self
.KeyList
:
187 RaiseParserError(Line
, CurrentSection
, Filename
, '', LineNo
)
190 if len(ItemList
) > 5:
191 RaiseParserError(Line
, CurrentSection
, Filename
, '', LineNo
)
193 if ItemList
[1] != '' and ItemList
[1].upper() not in ARCH_LIST_FULL
:
194 EdkLogger
.error("Parser", PARSER_ERROR
, "Invalid Arch definition '%s' found" % ItemList
[1], File
=Filename
, Line
=LineNo
, RaiseError
= EdkLogger
.IsRaiseError
)
195 ArchList
.append(ItemList
[1].upper())
196 ThirdList
.append(ItemList
[2])
199 if Comment
.endswith('\n'):
200 Comment
= Comment
[:len(Comment
) - len('\n')]
201 self
.SectionHeaderCommentDict
[Section
[CurrentSection
.upper()]] = Comment
205 # Not in any defined section
206 if CurrentSection
== TAB_UNKNOWN
:
207 ErrorMsg
= "%s is not in any defined section" % Line
208 EdkLogger
.error("Parser", PARSER_ERROR
, ErrorMsg
, File
=Filename
, Line
=LineNo
, RaiseError
= EdkLogger
.IsRaiseError
)
211 SectionItemList
.append([Line
, LineNo
, Comment
])
217 # Insert items data of last section
219 Model
= Section
[CurrentSection
.upper()]
220 InsertSectionItems(Model
, CurrentSection
, SectionItemList
, ArchList
, ThirdList
, self
.RecordSet
)
222 self
.SectionHeaderCommentDict
[Model
] = Comment
225 ## Package Object to DEC file
226 def PackageToDec(self
, Package
):
229 SectionHeaderCommentDict
= {}
233 PackageHeader
= Package
.PackageHeader
235 if PackageHeader
.Name
:
236 TmpList
.append(TAB_DEC_DEFINES_PACKAGE_NAME
+ ' = ' + PackageHeader
.Name
)
237 if PackageHeader
.Guid
:
238 TmpList
.append(TAB_DEC_DEFINES_PACKAGE_GUID
+ ' = ' + PackageHeader
.Guid
)
239 if PackageHeader
.Version
:
240 TmpList
.append(TAB_DEC_DEFINES_PACKAGE_VERSION
+ ' = ' + PackageHeader
.Version
)
241 if PackageHeader
.DecSpecification
:
242 TmpList
.append(TAB_DEC_DEFINES_DEC_SPECIFICATION
+ ' = ' + PackageHeader
.DecSpecification
)
243 if Package
.UserExtensions
!= None:
244 for Item
in Package
.UserExtensions
.Defines
:
246 DecList
['Defines'] =TmpList
247 if PackageHeader
.Description
!= '':
248 SectionHeaderCommentDict
['Defines'] = PackageHeader
.Description
250 for Item
in Package
.Includes
:
251 Key
= 'Includes.' + Item
.SupArchList
252 Value
= Item
.FilePath
253 GenMetaDatSectionItem(Key
, Value
, DecList
)
255 for Item
in Package
.GuidDeclarations
:
256 Key
= 'Guids.' + Item
.SupArchList
257 Value
= Item
.CName
+ '=' + Item
.Guid
258 GenMetaDatSectionItem(Key
, Value
, DecList
)
260 for Item
in Package
.ProtocolDeclarations
:
261 Key
= 'Protocols.' + Item
.SupArchList
262 Value
= Item
.CName
+ '=' + Item
.Guid
263 GenMetaDatSectionItem(Key
, Value
, DecList
)
265 for Item
in Package
.PpiDeclarations
:
266 Key
= 'Ppis.' + Item
.SupArchList
267 Value
= Item
.CName
+ '=' + Item
.Guid
268 GenMetaDatSectionItem(Key
, Value
, DecList
)
270 for Item
in Package
.LibraryClassDeclarations
:
271 Key
= 'LibraryClasses.' + Item
.SupArchList
272 Value
= Item
.LibraryClass
+ '|' + Item
.RecommendedInstance
273 GenMetaDatSectionItem(Key
, Value
, DecList
)
275 for Item
in Package
.PcdDeclarations
:
276 Key
= 'Pcds' + Item
.ItemType
+ '.' + Item
.SupArchList
277 Value
= Item
.TokenSpaceGuidCName
+ '.' + Item
.CName
278 if Item
.DefaultValue
!= '':
279 Value
= Value
+ '|' + Item
.DefaultValue
280 if Item
.DatumType
!= '':
281 Value
= Value
+ '|' + Item
.DatumType
283 Value
= Value
+ '|' + Item
.Token
284 GenMetaDatSectionItem(Key
, Value
, DecList
)
286 # Transfer Package to Inf
288 if Key
in SectionHeaderCommentDict
:
289 List
= SectionHeaderCommentDict
[Key
].split('\r')
291 Dec
= Dec
+ Item
+ '\n'
292 Dec
= Dec
+ '[' + Key
+ ']' + '\n'
293 for Value
in DecList
[Key
]:
294 if type(Value
) == type([]):
295 for SubValue
in Value
:
296 Dec
= Dec
+ ' ' + SubValue
+ '\n'
298 Dec
= Dec
+ ' ' + Value
+ '\n'
303 ## Transfer to Package Object
305 # Transfer all contents of a Dec file to a standard Package Object
307 def DecToPackage(self
):
308 # Init global information for the file
309 ContainerFile
= self
.Identification
.FullPath
311 # Generate Package Header
312 self
.GenPackageHeader(ContainerFile
)
316 self
.GenIncludes(ContainerFile
)
319 self
.GenGuidProtocolPpis(DataType
.TAB_GUIDS
, ContainerFile
)
322 self
.GenGuidProtocolPpis(DataType
.TAB_PROTOCOLS
, ContainerFile
)
325 self
.GenGuidProtocolPpis(DataType
.TAB_PPIS
, ContainerFile
)
327 # Generate LibraryClasses
328 self
.GenLibraryClasses(ContainerFile
)
331 self
.GenPcds(ContainerFile
)
334 self
.GenMiscFiles(ContainerFile
)
338 def GenMiscFiles(self
, ContainerFile
):
339 MiscFiles
= MiscFileClass()
340 MiscFiles
.Name
= 'ModuleFiles'
341 for Item
in GetFiles(os
.path
.dirname(ContainerFile
), ['CVS', '.svn'], False):
342 File
= CommonClass
.FileClass()
344 MiscFiles
.Files
.append(File
)
345 self
.Package
.MiscFiles
= MiscFiles
347 ## Get Package Header
349 # Gen Package Header of Dec as <Key> = <Value>
351 # @param ContainerFile: The Dec file full path
353 def GenPackageHeader(self
, ContainerFile
):
354 EdkLogger
.debug(2, "Generate PackageHeader ...")
356 # Update all defines item in database
358 RecordSet
= self
.RecordSet
[MODEL_META_DATA_HEADER
]
359 PackageHeader
= PackageHeaderClass()
361 for Record
in RecordSet
:
362 ValueList
= GetSplitValueList(Record
[0], TAB_EQUAL_SPLIT
)
363 if len(ValueList
) != 2:
364 OtherDefines
.append(Record
[0])
368 if Name
== TAB_DEC_DEFINES_PACKAGE_NAME
:
369 PackageHeader
.Name
= Value
370 elif Name
== TAB_DEC_DEFINES_PACKAGE_GUID
:
371 PackageHeader
.Guid
= Value
372 elif Name
== TAB_DEC_DEFINES_PACKAGE_VERSION
:
373 PackageHeader
.Version
= Value
374 elif Name
== TAB_DEC_DEFINES_DEC_SPECIFICATION
:
375 PackageHeader
.DecSpecification
= Value
377 OtherDefines
.append(Record
[0])
379 PackageHeader
.FileName
= self
.Identification
.FileName
380 PackageHeader
.FullPath
= self
.Identification
.FullPath
381 PackageHeader
.RelaPath
= self
.Identification
.RelaPath
382 PackageHeader
.PackagePath
= self
.Identification
.PackagePath
383 PackageHeader
.ModulePath
= self
.Identification
.ModulePath
384 PackageHeader
.CombinePath
= os
.path
.normpath(os
.path
.join(PackageHeader
.PackagePath
, PackageHeader
.ModulePath
, PackageHeader
.FileName
))
386 if MODEL_META_DATA_HEADER
in self
.SectionHeaderCommentDict
:
387 PackageHeader
.Description
= self
.SectionHeaderCommentDict
[MODEL_META_DATA_HEADER
]
389 self
.Package
.PackageHeader
= PackageHeader
390 UE
= UserExtensionsClass()
391 UE
.Defines
= OtherDefines
392 self
.Package
.UserExtensions
= UE
397 # Gen Includes of Dec
399 # @param ContainerFile: The Dec file full path
401 def GenIncludes(self
, ContainerFile
):
402 EdkLogger
.debug(2, "Generate %s ..." % TAB_INCLUDES
)
405 RecordSet
= self
.RecordSet
[MODEL_EFI_INCLUDE
]
407 # Go through each arch
408 for Record
in RecordSet
:
411 Include
= IncludeClass()
412 Include
.FilePath
= NormPath(Key
)
413 Include
.SupArchList
= Arch
414 self
.Package
.Includes
.append(Include
)
419 # <CName>=<GuidValue>
421 # @param ContainerFile: The Dec file full path
423 def GenGuidProtocolPpis(self
, Type
, ContainerFile
):
424 EdkLogger
.debug(2, "Generate %s ..." % Type
)
427 RecordSet
= self
.RecordSet
[Section
[Type
.upper()]]
429 # Go through each arch
430 for Record
in RecordSet
:
432 (Name
, Value
) = GetGuidsProtocolsPpisOfDec(Record
[0], Type
, ContainerFile
, Record
[2])
435 if Type
== TAB_GUIDS
:
436 ListMember
= self
.Package
.GuidDeclarations
437 elif Type
== TAB_PROTOCOLS
:
438 ListMember
= self
.Package
.ProtocolDeclarations
439 elif Type
== TAB_PPIS
:
440 ListMember
= self
.Package
.PpiDeclarations
442 ListClass
= GuidProtocolPpiCommonClass()
443 ListClass
.CName
= Name
444 ListClass
.Guid
= Value
445 ListClass
.SupArchList
= Arch
446 ListMember
.append(ListClass
)
450 # Gen LibraryClasses of Dec
451 # <CName>=<GuidValue>
453 # @param ContainerFile: The Dec file full path
455 def GenLibraryClasses(self
, ContainerFile
):
456 EdkLogger
.debug(2, "Generate %s ..." % TAB_LIBRARY_CLASSES
)
459 RecordSet
= self
.RecordSet
[MODEL_EFI_LIBRARY_CLASS
]
461 # Go through each arch
462 for Record
in RecordSet
:
464 List
= GetSplitValueList(Record
[0], DataType
.TAB_VALUE_SPLIT
)
467 LibraryClass
= LibraryClassClass()
468 LibraryClass
.LibraryClass
= List
[0]
469 LibraryClass
.RecommendedInstance
= NormPath(List
[1])
470 LibraryClass
.SupArchList
= Arch
471 self
.Package
.LibraryClassDeclarations
.append(LibraryClass
)
473 def AddPcd(self
, CName
, Token
, TokenSpaceGuidCName
, DatumType
, DefaultValue
, ItemType
, Arch
):
474 Pcd
= CommonClass
.PcdClass()
477 Pcd
.TokenSpaceGuidCName
= TokenSpaceGuidCName
478 Pcd
.DatumType
= DatumType
479 Pcd
.DefaultValue
= DefaultValue
480 Pcd
.ItemType
= ItemType
481 Pcd
.SupArchList
= Arch
482 self
.Package
.PcdDeclarations
.append(Pcd
)
487 # <TokenSpcCName>.<TokenCName>|<Value>|<DatumType>|<Token>
489 # @param ContainerFile: The Dec file full path
491 def GenPcds(self
, ContainerFile
):
492 EdkLogger
.debug(2, "Generate %s ..." % TAB_PCDS
)
496 RecordSet1
= self
.RecordSet
[MODEL_PCD_FIXED_AT_BUILD
]
497 RecordSet2
= self
.RecordSet
[MODEL_PCD_PATCHABLE_IN_MODULE
]
498 RecordSet3
= self
.RecordSet
[MODEL_PCD_FEATURE_FLAG
]
499 RecordSet4
= self
.RecordSet
[MODEL_PCD_DYNAMIC_EX
]
500 RecordSet5
= self
.RecordSet
[MODEL_PCD_DYNAMIC
]
502 # Go through each pcd
503 for Record
in RecordSet1
:
505 (TokenGuidCName
, TokenName
, DefaultValue
, DatumType
, Token
, ItemType
) = GetPcdOfDec(Record
[0], TAB_PCDS_FIXED_AT_BUILD
, ContainerFile
, Record
[2])
506 self
.AddPcd(TokenName
, Token
, TokenGuidCName
, DatumType
, DefaultValue
, ItemType
, Arch
)
507 for Record
in RecordSet2
:
509 (TokenGuidCName
, TokenName
, DefaultValue
, DatumType
, Token
, ItemType
) = GetPcdOfDec(Record
[0], TAB_PCDS_PATCHABLE_IN_MODULE
, ContainerFile
, Record
[2])
510 self
.AddPcd(TokenName
, Token
, TokenGuidCName
, DatumType
, DefaultValue
, ItemType
, Arch
)
511 for Record
in RecordSet3
:
513 (TokenGuidCName
, TokenName
, DefaultValue
, DatumType
, Token
, ItemType
) = GetPcdOfDec(Record
[0], TAB_PCDS_FEATURE_FLAG
, ContainerFile
, Record
[2])
514 self
.AddPcd(TokenName
, Token
, TokenGuidCName
, DatumType
, DefaultValue
, ItemType
, Arch
)
515 for Record
in RecordSet4
:
517 (TokenGuidCName
, TokenName
, DefaultValue
, DatumType
, Token
, ItemType
) = GetPcdOfDec(Record
[0], TAB_PCDS_DYNAMIC_EX
, ContainerFile
, Record
[2])
518 self
.AddPcd(TokenName
, Token
, TokenGuidCName
, DatumType
, DefaultValue
, ItemType
, Arch
)
519 for Record
in RecordSet5
:
521 (TokenGuidCName
, TokenName
, DefaultValue
, DatumType
, Token
, ItemType
) = GetPcdOfDec(Record
[0], TAB_PCDS_DYNAMIC
, ContainerFile
, Record
[2])
522 self
.AddPcd(TokenName
, Token
, TokenGuidCName
, DatumType
, DefaultValue
, ItemType
, Arch
)
524 ## Show detailed information of Package
526 # Print all members and their values of Package class
528 def ShowPackage(self
):
530 print 'Filename =', M
.PackageHeader
.FileName
531 print 'FullPath =', M
.PackageHeader
.FullPath
532 print 'RelaPath =', M
.PackageHeader
.RelaPath
533 print 'PackagePath =', M
.PackageHeader
.PackagePath
534 print 'ModulePath =', M
.PackageHeader
.ModulePath
535 print 'CombinePath =', M
.PackageHeader
.CombinePath
537 print 'BaseName =', M
.PackageHeader
.Name
538 print 'Guid =', M
.PackageHeader
.Guid
539 print 'Version =', M
.PackageHeader
.Version
540 print 'DecSpecification =', M
.PackageHeader
.DecSpecification
542 print '\nIncludes ='#, M.Includes
543 for Item
in M
.Includes
:
544 print Item
.FilePath
, Item
.SupArchList
545 print '\nGuids ='#, M.GuidDeclarations
546 for Item
in M
.GuidDeclarations
:
547 print Item
.CName
, Item
.Guid
, Item
.SupArchList
548 print '\nProtocols ='#, M.ProtocolDeclarations
549 for Item
in M
.ProtocolDeclarations
:
550 print Item
.CName
, Item
.Guid
, Item
.SupArchList
551 print '\nPpis ='#, M.PpiDeclarations
552 for Item
in M
.PpiDeclarations
:
553 print Item
.CName
, Item
.Guid
, Item
.SupArchList
554 print '\nLibraryClasses ='#, M.LibraryClassDeclarations
555 for Item
in M
.LibraryClassDeclarations
:
556 print Item
.LibraryClass
, Item
.RecommendedInstance
, Item
.SupModuleList
, Item
.SupArchList
557 print '\nPcds ='#, M.PcdDeclarations
558 for Item
in M
.PcdDeclarations
:
559 print 'CName=', Item
.CName
, 'TokenSpaceGuidCName=', Item
.TokenSpaceGuidCName
, 'DefaultValue=', Item
.DefaultValue
, 'ItemType=', Item
.ItemType
, 'Token=', Item
.Token
, 'DatumType=', Item
.DatumType
, Item
.SupArchList
560 print '\nUserExtensions =', M
.UserExtensions
.Defines
561 print '\n*** FileList ***'
562 for Item
in M
.MiscFiles
.Files
:
564 print '****************\n'
568 # This acts like the main() function for the script, unless it is 'import'ed into another
571 if __name__
== '__main__':
572 EdkLogger
.Initialize()
573 EdkLogger
.SetLevel(EdkLogger
.QUIET
)
575 W
= os
.getenv('WORKSPACE')
576 F
= os
.path
.join(W
, 'MdeModulePkg/MdeModulePkg.dec')
578 P
= Dec(os
.path
.normpath(F
), True, W
)
580 print P
.PackageToDec(P
.Package
)