Added macro replacement for BASE_NAME and library name for R8 module
authorjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Tue, 22 Jan 2008 01:30:30 +0000 (01:30 +0000)
committerjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Tue, 22 Jan 2008 01:30:30 +0000 (01:30 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@964 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/Common/InfClassObject.py

index 15b0c1c..c2d805e 100755 (executable)
@@ -275,7 +275,8 @@ class Inf(InfObject):
         # Get value for Header\r
         #\r
         ModuleHeader.InfVersion = Defines.DefinesDictionary[TAB_INF_DEFINES_INF_VERSION][0]\r
-        ModuleHeader.Name = Defines.DefinesDictionary[TAB_INF_DEFINES_BASE_NAME][0]\r
+        # R8 modules may use macro in base name\r
+        ModuleHeader.Name = ReplaceMacro(Defines.DefinesDictionary[TAB_INF_DEFINES_BASE_NAME][0], ModuleHeader.MacroDefines)\r
         ModuleHeader.Guid = Defines.DefinesDictionary[TAB_INF_DEFINES_FILE_GUID][0]\r
         \r
         ModuleHeader.FileName = self.Identification.FileName\r
@@ -450,7 +451,8 @@ class Inf(InfObject):
                 MergeArches(Libraries, Item, Arch)\r
         for Key in Libraries.keys():\r
             Library = ModuleLibraryClass()\r
-            Library.Library = ReplaceMacro(Key, self._Macro)\r
+            # replace macro and remove file extension\r
+            Library.Library = ReplaceMacro(Key, self._Macro).rsplit('.', 1)[0]\r
             Library.SupArchList = Libraries[Key]\r
             self.Module.Libraries.append(Library)\r
         \r
@@ -812,7 +814,6 @@ class Inf(InfObject):
             for Tab in TabList:\r
                 if Tab.upper().find(TAB_INF_DEFINES.upper()) > -1:\r
                     self.ParseDefines(Filename, Tab, Sect)\r
-                    # GetSingleValueOfKeyFromLines(Sect, self.Defines.DefinesDictionary, TAB_COMMENT_SPLIT, TAB_EQUAL_SPLIT, False, None)\r
                     continue\r
                 if Tab.upper().find(DataType.TAB_USER_EXTENSIONS.upper()) > -1:\r
                     self.UserExtensions = Sect\r