#\r
class TopLevelMakefile(BuildFile):\r
## template used to generate toplevel makefile\r
- _TEMPLATE_ = TemplateString('''${BEGIN}\tGenFds -f "${fdf_file}" -o "${platform_build_directory}" -t ${toolchain_tag} -b ${build_target} -p "${active_platform}" -a ${build_architecture_list} ${extra_options}${END}${BEGIN} -r ${fd} ${END}${BEGIN} -i ${fv} ${END}${BEGIN} -C ${cap} ${END}${BEGIN} -D ${macro} ${END}''')\r
+ _TEMPLATE_ = TemplateString('''${BEGIN}\tGenFds -f ${fdf_file} -o ${platform_build_directory} -t ${toolchain_tag} -b ${build_target} -p ${active_platform} -a ${build_architecture_list} ${extra_options}${END}${BEGIN} -r ${fd} ${END}${BEGIN} -i ${fv} ${END}${BEGIN} -C ${cap} ${END}${BEGIN} -D ${macro} ${END}''')\r
\r
## Constructor of TopLevelMakefile\r
#\r
# if working directory doesn't exist, Popen() will raise an exception\r
if not os.path.isdir(WorkingDir):\r
EdkLogger.error("build", FILE_NOT_FOUND, ExtraData=WorkingDir)\r
-\r
+ \r
+ # Command is used as the first Argument in following Popen().\r
+ # It could be a string or sequence. We find that if command is a string in following Popen(),\r
+ # ubuntu may fail with an error message that the command is not found.\r
+ # So here we may need convert command from string to list instance.\r
+ if not isinstance(Command, list):\r
+ Command = Command.split()\r
+ \r
Proc = None\r
EndOfProcedure = None\r
try:\r
for Arch in Wa.ArchList:\r
GlobalData.gGlobalDefines['ARCH'] = Arch\r
Pa = PlatformAutoGen(Wa, self.PlatformFile, BuildTarget, ToolChain, Arch)\r
- for Module in Pa.Platform.Modules:\r
- # Get ModuleAutoGen object to generate C code file and makefile\r
- Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile)\r
- if Ma == None:\r
- continue\r
- self.BuildModules.append(Ma)\r
self._BuildPa(self.Target, Pa)\r
\r
# Create MAP file when Load Fix Address is enabled.\r
Ma = ModuleAutoGen(Wa, self.ModuleFile, BuildTarget, ToolChain, Arch, self.PlatformFile)\r
if Ma == None: continue\r
MaList.append(Ma)\r
- self.BuildModules.append(Ma)\r
if not Ma.IsBinaryModule:\r
self._Build(self.Target, Ma, BuildModule=True)\r
\r