From 78bcd52abb1444c4dec7536d35f1a89dfe7e3625 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Thu, 13 Apr 2017 14:37:40 +0800 Subject: 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/AutoGen/AutoGen.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'BaseTools/Source/Python/AutoGen/AutoGen.py') diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 356eb21310..e05bf479ff 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -3855,6 +3855,11 @@ class ModuleAutoGen(AutoGen): '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): AsBuiltInfDict['module_inf_version'] = '0x%08x' % self.AutoGenVersion else: -- cgit v1.2.3