From b0978b57338e9e81edbe4a054b2afad844a93194 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Mon, 22 Jan 2018 17:55:17 +0800 Subject: [PATCH] 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 (cherry picked from commit 5e2c0ecd0bff48fb960ada1d138cbc382d4c1934) --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 ++ 1 file changed, 2 insertions(+) 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':