## @file\r
# process rule section generation\r
#\r
-# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
Filename = FfsInf.__ExtendMacro__(self.FileName)\r
BuildNum = FfsInf.__ExtendMacro__(self.BuildNum)\r
StringData = FfsInf.__ExtendMacro__(self.StringData)\r
+ ModuleNameStr = FfsInf.__ExtendMacro__('$(MODULE_NAME)')\r
NoStrip = True\r
if FfsInf.ModuleType in ('SEC', 'PEI_CORE', 'PEIM') and SectionType in ('TE', 'PE32'):\r
if FfsInf.KeepReloc is not None:\r
FileList.append(Filename)\r
elif os.path.exists(Filename):\r
FileList.append(Filename)\r
- elif '.depex' in FfsInf.FinalTargetSuffixMap or FfsInf.Depex:\r
- if IsMakefile:\r
+ elif IsMakefile:\r
+ SuffixMap = FfsInf.GetFinalTargetSuffixMap()\r
+ if '.depex' in SuffixMap:\r
FileList.append(Filename)\r
else:\r
FileList, IsSect = Section.Section.GetFileList(FfsInf, self.FileType, self.FileExtension, Dict, IsMakefile=IsMakefile)\r
\r
if InfOverrideUiString:\r
Num = SecNum\r
+ if IsMakefile and StringData == ModuleNameStr:\r
+ StringData = "$(MODULE_NAME)"\r
OutputFile = os.path.join( OutputPath, ModuleName + 'SEC' + str(Num) + Ffs.SectionSuffix.get(SectionType))\r
GenFdsGlobalVariable.GenerateSection(OutputFile, [], 'EFI_SECTION_USER_INTERFACE',\r
Ui=StringData, IsMakefile=IsMakefile)\r
f = open(File, 'r')\r
UiString = f.read()\r
f.close()\r
+ if IsMakefile and UiString == ModuleNameStr:\r
+ UiString = "$(MODULE_NAME)"\r
GenFdsGlobalVariable.GenerateSection(OutputFile, [], 'EFI_SECTION_USER_INTERFACE',\r
Ui=UiString, IsMakefile=IsMakefile)\r
OutputFileList.append(OutputFile)\r
EdkLogger.error("GenFds", GENFDS_ERROR, "File: %s miss UI Section value" %InfFileName)\r
\r
Num = SecNum\r
+ if IsMakefile and StringData == ModuleNameStr:\r
+ StringData = "$(MODULE_NAME)"\r
OutputFile = os.path.join( OutputPath, ModuleName + 'SEC' + str(Num) + Ffs.SectionSuffix.get(SectionType))\r
GenFdsGlobalVariable.GenerateSection(OutputFile, [], 'EFI_SECTION_USER_INTERFACE',\r
Ui=StringData, IsMakefile=IsMakefile)\r