From: Yonghong Zhu Date: Mon, 22 Jan 2018 09:55:17 +0000 (+0800) Subject: BaseTools: Enhance binary file in [Binaries] section use relative path X-Git-Tag: edk2-stable201903~2555 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=5e2c0ecd0bff48fb960ada1d138cbc382d4c1934;p=mirror_edk2.git BaseTools: Enhance binary file in [Binaries] section use relative path Enhance the binary file in Asbuilt inf file [Binaries] section use relative path. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 157ecfb395..d4d90a902d 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -4153,6 +4153,8 @@ class ModuleAutoGen(AutoGen): File = Item.Target.Path.replace('\\', '/').strip('/').replace(DebugDir, '').strip('/') if File not in self.OutputFile: self.OutputFile.append(File) + if os.path.isabs(File): + File = File.replace('\\', '/').strip('/').replace(OutputDir, '').strip('/') if Item.Target.Ext.lower() == '.aml': AsBuiltInfDict['binary_item'] += ['ASL|' + File] elif Item.Target.Ext.lower() == '.acpi':