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 <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yonghong Zhu 2018-01-22 17:55:17 +08:00
parent e74cea4c7b
commit 5e2c0ecd0b
1 changed files with 2 additions and 0 deletions

View File

@ -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':