]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/GenMake.py
BaseTools: Update Expression.py for string comparison and MACRO replace issue
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / GenMake.py
index 2abfdb3ac471dc243e0dbe94a0aee124077cb38d..afe6f2f99c47bee78e8bc76e426c4d5b98f551cd 100644 (file)
@@ -1,7 +1,7 @@
 ## @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
@@ -798,9 +798,13 @@ cleanlib:
                                     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
@@ -958,6 +962,8 @@ cleanlib:
                 # 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
@@ -1552,6 +1558,8 @@ class TopLevelMakefile(BuildFile):
                     if pcdValue.startswith('H'):\r
                         pcdValue = 'H' + '"' + pcdValue[1:] + '"'\r
                         ExtraOption += " --pcd " + pcdName + '=' + pcdValue\r
+                    elif pcdValue.startswith("L'"):\r
+                        ExtraOption += "--pcd " + pcdName + '=' + pcdValue\r
                     elif pcdValue.startswith('L'):\r
                         pcdValue = 'L' + '"' + pcdValue[1:] + '"'\r
                         ExtraOption += " --pcd " + pcdName + '=' + pcdValue\r