## @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
# For the rule only has simpleFile\r
#\r
MakefilePath = None\r
+ if self.IsBinaryModule:\r
+ IsMakefile = False\r
if IsMakefile:\r
MakefilePath = self.InfFileName, Arch\r
- if isinstance (Rule, RuleSimpleFile.RuleSimpleFile) :\r
+ if isinstance (Rule, RuleSimpleFile.RuleSimpleFile):\r
SectionOutputList = self.__GenSimpleFileSection__(Rule, IsMakefile=IsMakefile)\r
FfsOutput = self.__GenSimpleFileFfs__(Rule, SectionOutputList, MakefilePath=MakefilePath)\r
return FfsOutput\r
if Ui not in [None, '']:\r
#Cmd += ["-n", '"' + Ui + '"']\r
if IsMakefile:\r
- Cmd += ["-n", "$(MODULE_NAME)"]\r
+ if Ui == "$(MODULE_NAME)":\r
+ Cmd += ['-n', Ui]\r
+ else:\r
+ Cmd += ["-n", '"' + Ui + '"']\r
Cmd += ["-o", Output]\r
- #SaveFileOnChange(CommandFile, ' '.join(Cmd), False)\r
if ' '.join(Cmd).strip() not in GenFdsGlobalVariable.SecCmdList:\r
GenFdsGlobalVariable.SecCmdList.append(' '.join(Cmd).strip())\r
else:\r
## @file\r
# process GUIDed 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
self.Alignment = None\r
self.IncludeFvSection = False\r
self.ProcessRequired = "TRUE"\r
+ if IsMakefile and self.Alignment.strip() == '0':\r
+ self.Alignment = '1'\r
return OutputFileList, self.Alignment\r
\r
\r
## @file\r
# Trim files preprocessed by compiler\r
#\r
-# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
for CurrentDir, Dirs, Files in os.walk(DebugDir):\r
for FileName in Files:\r
Name, Ext = os.path.splitext(FileName)\r
- if Ext == '.lst':\r
+ if Ext == '.c' and Name != 'AutoGen':\r
VfrNameList.append (Name + 'Bin')\r
\r
VfrNameList.append (ModuleName + 'Strings')\r