## @file\r
# This file is used to create a database used by build tool\r
#\r
-# Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
self._PcdInfoFlag = None\r
self._VarCheckFlag = None\r
self._FlashDefinition = None\r
+ self._Prebuild = None\r
+ self._Postbuild = None\r
self._BuildNumber = None\r
self._MakefileName = None\r
self._BsBaseAddress = None\r
if ErrorCode != 0:\r
EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=Record[-1],\r
ExtraData=ErrorInfo)\r
+ elif Name == TAB_DSC_PREBUILD:\r
+ self._Prebuild = PathClass(NormPath(Record[2], self._Macros), GlobalData.gWorkspace)\r
+ elif Name == TAB_DSC_POSTBUILD:\r
+ self._Postbuild = PathClass(NormPath(Record[2], self._Macros), GlobalData.gWorkspace)\r
elif Name == TAB_DSC_DEFINES_SUPPORTED_ARCHITECTURES:\r
self._SupArchList = GetSplitValueList(Record[2], TAB_VALUE_SPLIT)\r
elif Name == TAB_DSC_DEFINES_BUILD_TARGETS:\r
self._FlashDefinition = ''\r
return self._FlashDefinition\r
\r
+ def _GetPrebuild(self):\r
+ if self._Prebuild == None:\r
+ if self._Header == None:\r
+ self._GetHeaderInfo()\r
+ if self._Prebuild == None:\r
+ self._Prebuild = ''\r
+ return self._Prebuild\r
+\r
+ def _GetPostbuild(self):\r
+ if self._Postbuild == None:\r
+ if self._Header == None:\r
+ self._GetHeaderInfo()\r
+ if self._Postbuild == None:\r
+ self._Postbuild = ''\r
+ return self._Postbuild\r
+\r
## Retrieve FLASH_DEFINITION\r
def _GetBuildNumber(self):\r
if self._BuildNumber == None:\r
PcdInfoFlag = property(_GetPcdInfoFlag)\r
VarCheckFlag = property(_GetVarCheckFlag)\r
FlashDefinition = property(_GetFdfFile)\r
+ Prebuild = property(_GetPrebuild)\r
+ Postbuild = property(_GetPostbuild)\r
BuildNumber = property(_GetBuildNumber)\r
MakefileName = property(_GetMakefileName)\r
BsBaseAddress = property(_GetBsBaseAddress)\r
PlatformList.append(Platform)\r
return PlatformList\r
\r
+ def _MapPlatform(self, Dscfile):\r
+ try:\r
+ Platform = self.BuildObject[PathClass(Dscfile), 'COMMON']\r
+ except:\r
+ Platform = None\r
+ return Platform\r
+\r
PlatformList = property(_GetPlatformList)\r
\r
##\r