InfSoucesObject.py revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
## @file
# This file is used to define class objects of INF file [Sources] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this
# distribution. The full text of the license may be found at
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
'''
InfSourcesObject
'''
import os
from Library import GlobalData
## __GenSourceInstance
#
#
#
# File | Family | TagName | ToolCode | FeatureFlagExpr
#
#
# Validate Feature Flag Express
#
#
# Validate FFE
#
if not FeatureFlagRtv[0]:
else:
else:
#
# To align with UDP specification. "*" is not permitted in UDP specification
#
else:
#
# Validate file name exist.
#
FullFileName = os.path.normpath(os.path.realpath(os.path.join(GlobalData.gINF_MODULE_DIR, Item[0])))
#
#
else:
return False
if IsValidFileFlag:
else:
return ItemObj
## InfSourcesItemObject()
#
#
class InfSourcesItemObject():
SourceFileName = '', \
Family = '', \
TagName = '', \
ToolCode = '', \
FeatureFlagExp = ''):
self.SupArchList = []
def GetSourceFileName(self):
return self.SourceFileName
def GetTagName(self):
def GetToolCode(self):
def GetFeatureFlagExp(self):
return self.FeatureFlagExp
def GetHeaderString(self):
return self.HeaderString
def GetTailString(self):
return self.TailString
def GetSupArchList(self):
return self.SupArchList
##
#
#
#
class InfSourcesObject(InfSectionCommonDef):
__SupArchList = []
#
# Validate Arch
#
ArchItem = 'COMMON'
for Item in SourceList:
else:
SourceContent = []
return True
def GetSources(self):