## @file\r
# This file is used to define common parsing related functions used in parsing INF/DEC/DSC process\r
#\r
-# Copyright (c) 2008 ~ 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2010, 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
# http://opensource.org/licenses/bsd-license.php\r
# @retval truple() A truple structure as (Family, ToolChain, Flag)\r
#\r
def GetBuildOption(String, File, LineNo = -1):\r
+ (Family, ToolChain, Flag) = ('', '', '')\r
if String.find(TAB_EQUAL_SPLIT) < 0:\r
RaiseParserError(String, 'BuildOptions', File, '[<Family>:]<ToolFlag>=Flag', LineNo)\r
- (Family, ToolChain, Flag) = ('', '', '')\r
- List = GetSplitValueList(String, TAB_EQUAL_SPLIT, MaxSplit = 1)\r
- if List[0].find(':') > -1:\r
- Family = List[0][ : List[0].find(':')].strip()\r
- ToolChain = List[0][List[0].find(':') + 1 : ].strip()\r
else:\r
- ToolChain = List[0].strip()\r
- Flag = List[1].strip()\r
-\r
+ List = GetSplitValueList(String, TAB_EQUAL_SPLIT, MaxSplit = 1)\r
+ if List[0].find(':') > -1:\r
+ Family = List[0][ : List[0].find(':')].strip()\r
+ ToolChain = List[0][List[0].find(':') + 1 : ].strip()\r
+ else:\r
+ ToolChain = List[0].strip()\r
+ Flag = List[1].strip()\r
return (Family, ToolChain, Flag)\r
\r
## Get Library Class\r