BaseTools: Copy "MODULE_UNI_FILE" file into OUTPUT directory

Current the "MODULE_UNI_FILE" item defined in the [Defines] section will
be copied into As Built INF file, but tool doesn't copy the real file into
same directory with the As Built INF file.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yonghong Zhu 2017-04-13 14:37:40 +08:00
parent bb427a23ab
commit 78bcd52abb
1 changed files with 5 additions and 0 deletions

View File

@ -3855,6 +3855,11 @@ class ModuleAutoGen(AutoGen):
'libraryclasses_item' : [] 'libraryclasses_item' : []
} }
if 'MODULE_UNI_FILE' in MDefs:
UNIFile = os.path.join(self.MetaFile.Dir, MDefs['MODULE_UNI_FILE'])
if os.path.isfile(UNIFile):
shutil.copy2(UNIFile, self.OutputDir)
if self.AutoGenVersion > int(gInfSpecVersion, 0): if self.AutoGenVersion > int(gInfSpecVersion, 0):
AsBuiltInfDict['module_inf_version'] = '0x%08x' % self.AutoGenVersion AsBuiltInfDict['module_inf_version'] = '0x%08x' % self.AutoGenVersion
else: else: