for Inc in IncludesList:\r
if Inc not in RetVal:\r
RetVal.append(str(Inc))\r
+ RetVal.extend(self.IncPathFromBuildOptions)\r
return RetVal\r
\r
+ @cached_property\r
+ def IncPathFromBuildOptions(self):\r
+ IncPathList = []\r
+ for tool in self.BuildOption:\r
+ if 'FLAGS' in self.BuildOption[tool]:\r
+ flags = self.BuildOption[tool]['FLAGS']\r
+ whitespace = False\r
+ for flag in flags.split(" "):\r
+ flag = flag.strip()\r
+ if flag.startswith(("/I","-I")):\r
+ if len(flag)>2:\r
+ if os.path.exists(flag[2:]):\r
+ IncPathList.append(flag[2:])\r
+ else:\r
+ whitespace = True\r
+ continue\r
+ if whitespace and flag:\r
+ if os.path.exists(flag):\r
+ IncPathList.append(flag)\r
+ whitespace = False\r
+ return IncPathList\r
+\r
@cached_property\r
def IncludePathLength(self):\r
return sum(len(inc)+1 for inc in self.IncludePathList)\r
def OutputFile(self):\r
retVal = set()\r
\r
- OutputDir = self.OutputDir.replace('\\', '/').strip('/')\r
- DebugDir = self.DebugDir.replace('\\', '/').strip('/')\r
- for Item in self.CodaTargetList:\r
- File = Item.Target.Path.replace('\\', '/').strip('/').replace(DebugDir, '').replace(OutputDir, '').strip('/')\r
- NewFile = path.join(self.OutputDir, File)\r
- retVal.add(NewFile)\r
-\r
- Bin = self._GenOffsetBin()\r
- if Bin:\r
- NewFile = path.join(self.OutputDir, Bin)\r
- retVal.add(NewFile)\r
-\r
- for Root, Dirs, Files in os.walk(self.OutputDir):\r
+ for Root, Dirs, Files in os.walk(self.BuildDir):\r
for File in Files:\r
# lib file is already added through above CodaTargetList, skip it here\r
- if not (File.lower().endswith('.obj') or File.lower().endswith('.lib')):\r
- NewFile = path.join(self.OutputDir, File)\r
+ if not (File.lower().endswith('.obj') or File.lower().endswith('.debug')):\r
+ NewFile = path.join(Root, File)\r
retVal.add(NewFile)\r
\r
for Root, Dirs, Files in os.walk(self.FfsOutputDir):\r
for File in Files:\r
- NewFile = path.join(self.FfsOutputDir, File)\r
+ NewFile = path.join(Root, File)\r
retVal.add(NewFile)\r
\r
return retVal\r
\r
self.IsAsBuiltInfCreated = True\r
\r
- def CacheCopyFile(self, OriginDir, CopyDir, File):\r
- sub_dir = os.path.relpath(File, CopyDir)\r
- destination_file = os.path.join(OriginDir, sub_dir)\r
+ def CacheCopyFile(self, DestDir, SourceDir, File):\r
+ sub_dir = os.path.relpath(File, SourceDir)\r
+ destination_file = os.path.join(DestDir, sub_dir)\r
destination_dir = os.path.dirname(destination_file)\r
CreateDirectory(destination_dir)\r
try:\r