self.CopyModuleToCache()\r
\r
def CopyModuleToCache(self):\r
- FileDir = path.join(GlobalData.gBinCacheDest, self.PlatformInfo.Name, self.BuildTarget + "_" + self.ToolChain, self.Arch, self.SourceDir, self.MetaFile.BaseName)\r
+ FileDir = path.join(GlobalData.gBinCacheDest, self.PlatformInfo.OutputDir, self.BuildTarget + "_" + self.ToolChain, self.Arch, self.SourceDir, self.MetaFile.BaseName)\r
CreateDirectory (FileDir)\r
HashFile = path.join(self.BuildDir, self.Name + '.hash')\r
if os.path.exists(HashFile):\r
ModuleFile = path.join(self.OutputDir, self.Name + '.inf')\r
if os.path.exists(ModuleFile):\r
shutil.copy2(ModuleFile, FileDir)\r
+ else:\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
+ self.OutputFile.add(File)\r
if not self.OutputFile:\r
Ma = self.BuildDatabase[self.MetaFile, self.Arch, self.BuildTarget, self.ToolChain]\r
self.OutputFile = Ma.Binaries\r
for f_ext in self.SourceFileList:\r
if '.inc' in str(f_ext):\r
return False\r
- FileDir = path.join(GlobalData.gBinCacheSource, self.PlatformInfo.Name, self.BuildTarget + "_" + self.ToolChain, self.Arch, self.SourceDir, self.MetaFile.BaseName)\r
+ FileDir = path.join(GlobalData.gBinCacheSource, self.PlatformInfo.OutputDir, self.BuildTarget + "_" + self.ToolChain, self.Arch, self.SourceDir, self.MetaFile.BaseName)\r
HashFile = path.join(FileDir, self.Name + '.hash')\r
if os.path.exists(HashFile):\r
f = open(HashFile, 'r')\r
for root, dir, files in os.walk(FileDir):\r
for f in files:\r
if self.Name + '.hash' in f:\r
- shutil.copy2(HashFile, self.BuildDir)\r
+ shutil.copy(HashFile, self.BuildDir)\r
else:\r
File = path.join(root, f)\r
sub_dir = os.path.relpath(File, FileDir)\r
destination_file = os.path.join(self.OutputDir, sub_dir)\r
destination_dir = os.path.dirname(destination_file)\r
CreateDirectory(destination_dir)\r
- shutil.copy2(File, destination_dir)\r
+ shutil.copy(File, destination_dir)\r
if self.Name == "PcdPeim" or self.Name == "PcdDxe":\r
CreatePcdDatabaseCode(self, TemplateString(), TemplateString())\r
return True\r