mirror of https://github.com/acidanthera/audk.git
BaseTools: Support QuotedString for PREBUILD/POSTBUILD in DSC file
If the prebuild/postbuild script statement start with double quotations, current tool report error, while DSC spec allow this usage. so update tool to support it. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
3e7e8571da
commit
c62f1874f4
|
@ -231,9 +231,21 @@ class DscBuildData(PlatformBuildClassObject):
|
||||||
EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=Record[-1],
|
EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=Record[-1],
|
||||||
ExtraData=ErrorInfo)
|
ExtraData=ErrorInfo)
|
||||||
elif Name == TAB_DSC_PREBUILD:
|
elif Name == TAB_DSC_PREBUILD:
|
||||||
self._Prebuild = PathClass(NormPath(Record[2], self._Macros), GlobalData.gWorkspace)
|
PrebuildValue = Record[2]
|
||||||
|
if Record[2][0] == '"':
|
||||||
|
if Record[2][-1] != '"':
|
||||||
|
EdkLogger.error('build', FORMAT_INVALID, 'Missing double quotes in the end of %s statement.' % TAB_DSC_PREBUILD,
|
||||||
|
File=self.MetaFile, Line=Record[-1])
|
||||||
|
PrebuildValue = Record[2][1:-1]
|
||||||
|
self._Prebuild = PathClass(NormPath(PrebuildValue, self._Macros), GlobalData.gWorkspace)
|
||||||
elif Name == TAB_DSC_POSTBUILD:
|
elif Name == TAB_DSC_POSTBUILD:
|
||||||
self._Postbuild = PathClass(NormPath(Record[2], self._Macros), GlobalData.gWorkspace)
|
PostbuildValue = Record[2]
|
||||||
|
if Record[2][0] == '"':
|
||||||
|
if Record[2][-1] != '"':
|
||||||
|
EdkLogger.error('build', FORMAT_INVALID, 'Missing double quotes in the end of %s statement.' % TAB_DSC_POSTBUILD,
|
||||||
|
File=self.MetaFile, Line=Record[-1])
|
||||||
|
PostbuildValue = Record[2][1:-1]
|
||||||
|
self._Postbuild = PathClass(NormPath(PostbuildValue, self._Macros), GlobalData.gWorkspace)
|
||||||
elif Name == TAB_DSC_DEFINES_SUPPORTED_ARCHITECTURES:
|
elif Name == TAB_DSC_DEFINES_SUPPORTED_ARCHITECTURES:
|
||||||
self._SupArchList = GetSplitValueList(Record[2], TAB_VALUE_SPLIT)
|
self._SupArchList = GetSplitValueList(Record[2], TAB_VALUE_SPLIT)
|
||||||
elif Name == TAB_DSC_DEFINES_BUILD_TARGETS:
|
elif Name == TAB_DSC_DEFINES_BUILD_TARGETS:
|
||||||
|
|
Loading…
Reference in New Issue