|
From: <js...@us...> - 2011-10-28 07:34:28
|
Revision: 2388
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2388&view=rev
Author: jsu1
Date: 2011-10-28 07:34:22 +0000 (Fri, 28 Oct 2011)
Log Message:
-----------
Add RVCT include directory option flag support
Reviewed-by: gikidy
Signed-off-by: jsu1
Modified Paths:
--------------
trunk/BaseTools/Source/Python/AutoGen/AutoGen.py
Modified: trunk/BaseTools/Source/Python/AutoGen/AutoGen.py
===================================================================
--- trunk/BaseTools/Source/Python/AutoGen/AutoGen.py 2011-10-28 06:28:05 UTC (rev 2387)
+++ trunk/BaseTools/Source/Python/AutoGen/AutoGen.py 2011-10-28 07:34:22 UTC (rev 2388)
@@ -2184,13 +2184,19 @@
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 @@
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.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|