Fixed an issue in binary file support
authorjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 28 Feb 2008 05:58:44 +0000 (05:58 +0000)
committerjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Thu, 28 Feb 2008 05:58:44 +0000 (05:58 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1023 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/AutoGen/GenMake.py

index 41d3dfe..73bbbd9 100755 (executable)
@@ -779,9 +779,13 @@ class Makefile(object):
                                     self.ModuleInfo.ToolChain, self.ModuleInfo.Arch))\r
 \r
         if self.ModuleInfo.IsLibrary:\r
-            self.ResultFileList = self.DestFileDatabase["Static-Library-File"]\r
+            if "Static-Library-File" in self.DestFileDatabase:\r
+                self.ResultFileList = self.DestFileDatabase["Static-Library-File"]\r
         elif self.ModuleInfo.ModuleType == "USER_DEFINED":\r
-            self.ResultFileList = self.DestFileDatabase["Dynamic-Library-File"]\r
+            if "Dynamic-Library-File" in self.DestFileDatabase:\r
+                self.ResultFileList = self.DestFileDatabase["Dynamic-Library-File"]\r
+        if len(self.ResultFileList) == 0:\r
+            EdkLogger.error("AutoGen", AUTOGEN_ERROR, "Don't know how to end the module build")\r
 \r
         SourceFileMacroNameList = []\r
         SourceFileMacroList = [] # macro name = file list\r