Fixed several typo in R8.x module support code
[people/mcb30/basetools.git] / Source / Python / Workspace / WorkspaceDatabase.py
index fe75e52..f2ba531 100644 (file)
@@ -500,7 +500,7 @@ class DscBuildData(PlatformBuildClassObject):
             for LibraryName in M.Libraries:\r
                 if LibraryName not in self.Libraries:\r
                     EdkLogger.warn("AutoGen", "Library [%s] is not found" % LibraryName,\r
-                                    ExtraData="\t%s [%s]" % (str(Module), Arch))\r
+                                    ExtraData="\t%s [%s]" % (str(Module), self._Arch))\r
                     continue\r
 \r
                 Library = self.Libraries[LibraryName]\r
@@ -1309,15 +1309,17 @@ class InfBuildData(ModuleBuildClassObject):
                     self._ModuleEntryPointList.append(Value)\r
                 elif Name == "DPX_SOURCE":\r
                     File = NormPath(Value, self._Macros)\r
-                    if not ValidFile(Source, self._ModuleDir):\r
+                    if not ValidFile(File, self._ModuleDir):\r
                         EdkLogger.error('build', FILE_NOT_FOUND, ExtraData=File,\r
                                         File=self.DescFilePath, Line=LineNo)\r
+                    if self._Sources == None:\r
+                        self._Sources = []\r
                     self._Sources.append(ModuleSourceFileClass(File, "", "", "", ""))\r
                 else:\r
                     ToolList = self._NMAKE_FLAG_PATTERN_.findall(Name)\r
                     if len(ToolList) == 0 or len(ToolList) != 1:\r
-                        EdkLogger.warn("\nbuild", "Don't know how to do with MACRO: %s" % Name, \r
-                                       ExtraData=ContainerFile)\r
+                        EdkLogger.warn("\nbuild", "Don't know how to do with macro [%s]" % Name, \r
+                                       File=self.DescFilePath, Line=LineNo)\r
                     else:\r
                         if self._BuildOptions == None:\r
                             self._BuildOptions = sdict()\r