summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/AutoGen/AutoGen.py
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-09 04:32:08 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-09 04:32:08 +0000
commitd40b2ee60ef161044bcaf05a8b36aa60eac633cc (patch)
tree1a74bea930f47fe2bb8f9d07d0151c6c7d9adac3 /BaseTools/Source/Python/AutoGen/AutoGen.py
parent080681592188f45228616983f9e1610ab9e86615 (diff)
downloadedk2-platforms-d40b2ee60ef161044bcaf05a8b36aa60eac633cc.tar.xz
Sync BaseTool trunk (version r2397) into EDKII BaseTools. The change mainly includes
1. Fix the issue that root directory of disk can’t be used as WORKSPACE. 2. Update AutoGen code style to pass C++ compiler. Signed-off-by: lgao4 Reviewed-by: jsu1 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12676 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/AutoGen.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py22
1 files changed, 19 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 2def474b17..700b689a54 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -2184,13 +2184,19 @@ class ModuleAutoGen(AutoGen):
def _GetBuildOptionIncPathList(self):
if self._BuildOptionIncPathList == None:
#
- # Regular expression for finding Include Directories, the difference between MSFT and INTEL/GCC
+ # Regular expression for finding Include Directories, the difference between MSFT and INTEL/GCC/RVCT
# is the former use /I , the Latter used -I to specify include directories
#
if self.PlatformInfo.ToolChainFamily in ('MSFT'):
gBuildOptIncludePattern = re.compile(r"(?:.*?)/I[ \t]*([^ ]*)", re.MULTILINE|re.DOTALL)
- elif self.PlatformInfo.ToolChainFamily in ('INTEL', 'GCC'):
+ elif self.PlatformInfo.ToolChainFamily in ('INTEL', 'GCC', 'RVCT'):
gBuildOptIncludePattern = re.compile(r"(?:.*?)-I[ \t]*([^ ]*)", re.MULTILINE|re.DOTALL)
+ else:
+ #
+ # New ToolChainFamily, don't known whether there is option to specify include directories
+ #
+ self._BuildOptionIncPathList = []
+ return self._BuildOptionIncPathList
BuildOptionIncPathList = []
for Tool in ('CC', 'PP', 'VFRPP', 'ASLPP', 'ASLCC', 'APP', 'ASM'):
@@ -2200,7 +2206,17 @@ class ModuleAutoGen(AutoGen):
except KeyError:
FlagOption = ''
- IncPathList = [NormPath(Path, self.Macros) for Path in gBuildOptIncludePattern.findall(FlagOption)]
+ if self.PlatformInfo.ToolChainFamily != 'RVCT':
+ IncPathList = [NormPath(Path, self.Macros) for Path in gBuildOptIncludePattern.findall(FlagOption)]
+ else:
+ #
+ # RVCT may specify a list of directory seperated by commas
+ #
+ IncPathList = []
+ for Path in gBuildOptIncludePattern.findall(FlagOption):
+ PathList = GetSplitList(Path, TAB_COMMA_SPLIT)
+ IncPathList += [NormPath(PathEntry, self.Macros) for PathEntry in PathList]
+
#
# EDK II modules must not reference header files outside of the packages they depend on or
# within the module's directory tree. Report error if violation.