summaryrefslogtreecommitdiff
path: root/BaseTools/Conf
diff options
context:
space:
mode:
authorYingke Liu <yingke.d.liu@intel.com>2015-06-10 07:50:59 +0000
committeryingke <yingke@Edk2>2015-06-10 07:50:59 +0000
commit867d1cd4cd7d2b4242a227067b3fce69546f0528 (patch)
treec2aff0a521aef5c19169e377141e0980261d838c /BaseTools/Conf
parent684fec3c964dd125160d47992413b3c95170f885 (diff)
downloadedk2-platforms-867d1cd4cd7d2b4242a227067b3fce69546f0528.tar.xz
BaseTools: Append FILE_GUID to BaseName.
This patch makes sure the EFI file in $(BIN_DIR) is unique. If there are modules with same BaseName, the FILE_GUID is appended. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17608 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Conf')
-rw-r--r--BaseTools/Conf/build_rule.template14
1 files changed, 8 insertions, 6 deletions
diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index 3b054c4ddd..596d41d5f5 100644
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -66,6 +66,8 @@
# $(LIBS) Static library files of current module
# $(<tool>_FLAGS) Tools flags of current module
# $(MODULE_NAME) Current module name
+# $(MODULE_NAME_GUID) Current module name with module FILE_GUID if same $(MODULE_NAME) exists
+# in different modules, otherwise its value is same as $(MODULE_NAME)
# $(MODULE_TYPE) Current module type
# $(MODULE_GUID) Current module guid
# $(ARCH) Architecture of current module
@@ -334,7 +336,7 @@
<Command.MSFT, Command.INTEL, Command.RVCT, Command.ARMGCC, Command.ARMLINUXGCC>
"$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
$(CP) ${dst} $(OUTPUT_DIR)
- $(CP) ${dst} $(BIN_DIR)
+ $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
-$(CP) $(DEBUG_DIR)(+)*.pdb $(OUTPUT_DIR)
<Command.GCC>
@@ -345,11 +347,11 @@
#The below 2 lines are only needed for UNIXGCC tool chain, which genereates PE image directly
#
-$(OBJCOPY) $(OBJCOPY_ADDDEBUGFLAG) ${src}
- -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)
+ -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)(+)$(MODULE_NAME_GUID).debug
"$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
$(CP) ${dst} $(OUTPUT_DIR)
- $(CP) ${dst} $(BIN_DIR)
+ $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
<Command.XCODE>
@@ -359,7 +361,7 @@
-$(DSYMUTIL) ${src}
"$(GENFW)" -e $(MODULE_TYPE) -o ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pecoff $(GENFW_FLAGS)
$(CP) ${dst} $(OUTPUT_DIR)
- $(CP) ${dst} $(BIN_DIR)
+ $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
[Dependency-Expression-File]
@@ -516,7 +518,7 @@
<Command>
"$(GENFW)" -o ${dst} -j $(MICROCODE_BINARY_FILES) $(GENFW_FLAGS)
- -$(CP) ${dst} $(BIN_DIR)
+ -$(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).bin
[EFI-Image-File]
<InputFile>
@@ -542,7 +544,7 @@
?.efi, ?.EFI, ?.Efi
<OutputFile>
- $(BIN_DIR)(+)$(MODULE_NAME).rom
+ $(BIN_DIR)(+)$(MODULE_NAME_GUID).rom
<Command>
$(OPTROM) -i $(PCI_DEVICE_ID) -f $(PCI_VENDOR_ID) -l $(PCI_CLASS_CODE) -r $(PCI_REVISION) -o $dst $(OPTROM_FLAGS) $src