## @file\r
# Create makefile for MS nmake and GNU make\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
Tool = Flag\r
break\r
if Tool:\r
+ if 'PATH' not in self._AutoGenObject._BuildOption[Tool]:\r
+ EdkLogger.error("build", AUTOGEN_ERROR, "%s_PATH doesn't exist in %s ToolChain and %s Arch." %(Tool, self._AutoGenObject.ToolChain, self._AutoGenObject.Arch), ExtraData="[%s]" % str(self._AutoGenObject))\r
SingleCommandLength += len(self._AutoGenObject._BuildOption[Tool]['PATH'])\r
for item in SingleCommandList[1:]:\r
if FlagDict[Tool]['Macro'] in item:\r
+ if 'FLAGS' not in self._AutoGenObject._BuildOption[Tool]:\r
+ EdkLogger.error("build", AUTOGEN_ERROR, "%s_FLAGS doesn't exist in %s ToolChain and %s Arch." %(Tool, self._AutoGenObject.ToolChain, self._AutoGenObject.Arch), ExtraData="[%s]" % str(self._AutoGenObject))\r
Str = self._AutoGenObject._BuildOption[Tool]['FLAGS']\r
for Option in self._AutoGenObject.BuildOption.keys():\r
for Attr in self._AutoGenObject.BuildOption[Option]:\r
# skip non-C files\r
if File.Ext not in [".c", ".C"] or File.Name == "AutoGen.c":\r
continue\r
- elif DepSet == None:\r
+ elif DepSet is None:\r
DepSet = set(self.FileDependency[File])\r
else:\r
DepSet &= set(self.FileDependency[File])\r
# in case nothing in SourceFileList\r
- if DepSet == None:\r
+ if DepSet is None:\r
DepSet = set()\r
#\r
# Extract common files list in the dependency files\r
# Use file list macro as dependency\r
if T.GenFileListMacro:\r
Deps.append("$(%s)" % T.FileListMacro)\r
+ if Type in [TAB_OBJECT_FILE, TAB_STATIC_LIBRARY]:\r
+ Deps.append("$(%s)" % T.ListFileMacro)\r
\r
TargetDict = {\r
"target" : self.PlaceMacro(T.Target.Path, self.Macros),\r
\r
# TRICK: for not generating GenFds call in makefile if no FDF file\r
MacroList = []\r
- if PlatformInfo.FdfFile != None and PlatformInfo.FdfFile != "":\r
+ if PlatformInfo.FdfFile is not None and PlatformInfo.FdfFile != "":\r
FdfFileList = [PlatformInfo.FdfFile]\r
# macros passed to GenFds\r
MacroList.append('"%s=%s"' % ("EFI_SOURCE", GlobalData.gEfiSource.replace('\\', '\\\\')))\r
if GlobalData.gIgnoreSource:\r
ExtraOption += " --ignore-sources"\r
\r
- if GlobalData.BuildOptionPcd:\r
- for index, option in enumerate(GlobalData.gCommand):\r
- if "--pcd" == option and GlobalData.gCommand[index+1]:\r
- pcdName, pcdValue = GlobalData.gCommand[index+1].split('=')\r
- if pcdValue.startswith('H'):\r
- pcdValue = 'H' + '"' + pcdValue[1:] + '"'\r
- ExtraOption += " --pcd " + pcdName + '=' + pcdValue\r
- elif pcdValue.startswith('L'):\r
- pcdValue = 'L' + '"' + pcdValue[1:] + '"'\r
- ExtraOption += " --pcd " + pcdName + '=' + pcdValue\r
- else:\r
- ExtraOption += " --pcd " + GlobalData.gCommand[index+1]\r
+ for pcd in GlobalData.BuildOptionPcd:\r
+ if pcd[2]:\r
+ pcdname = '.'.join(pcd[0:3])\r
+ else:\r
+ pcdname = '.'.join(pcd[0:2])\r
+ if pcd[3].startswith('{'):\r
+ ExtraOption += " --pcd " + pcdname + '=' + 'H' + '"' + pcd[3] + '"'\r
+ else:\r
+ ExtraOption += " --pcd " + pcdname + '=' + pcd[3]\r
\r
MakefileName = self._FILE_NAME_[self._FileType]\r
SubBuildCommandList = []\r