## @file
# This file contained the parser for BuildOption sections in INF file
#
# 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.
#
'''
InfBuildOptionSectionParser
'''
##
# Import Modules
#
## InfBuildOptionParser
#
#
BuildOptionList = []
SectionContent = ''
if not GlobalData.gIS_BINARY_INF:
ValueList = []
LineNo = 0
for Line in SectionString:
TailComments = ''
continue
#
# Found Comment
#
continue
#
# Find Tail comment.
#
#
# "Replace" type build option
#
else:
#
# "Append" type build option
#
else:
#
# Replace with [Defines] section Macro
#
self.FileLocalMacros, None)
EqualString = ''
if not ReplaceFlag:
EqualString = ' = '
else:
EqualString = ' == '
ValueList = []
continue
else:
#
# Current section archs
#
ArchList = []
LastItem = ''
## InfBuildOptionParser
#
#
BuildOptionList = []
#
# AsBuild Binary INF file.
#
BuildOptionItem = []
Count = 0
for Line in SectionString:
Count += 1
#
# The last line
#
else:
break
continue
BuildOptionItem = []
continue
return BuildOptionList