]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Common/FdfParserLite.py
BaseTools: Update Build tool to support multiple workspaces
[mirror_edk2.git] / BaseTools / Source / Python / Common / FdfParserLite.py
index 54a60a7e8f81c1655c434b29f776edb88ad74b77..a0ee249748e1d8bb0e20aba265b74badc5175cbc 100644 (file)
@@ -20,6 +20,7 @@ import Common.LongFilePathOs as os
 \r
 import CommonDataClass.FdfClass\r
 from Common.LongFilePathSupport import OpenLongFilePath as open\r
+from Common.MultipleWorkspace import MultipleWorkspace as mws\r
 \r
 ##define T_CHAR_SPACE                ' '\r
 ##define T_CHAR_NULL                 '\0'\r
@@ -485,7 +486,8 @@ class FdfParser(object):
                 IncFileName = self.__Token\r
                 if not os.path.isabs(IncFileName):\r
                     if IncFileName.startswith('$(WORKSPACE)'):\r
-                        Str = IncFileName.replace('$(WORKSPACE)', os.environ.get('WORKSPACE'))\r
+                        Str = mws.handleWsMacro(IncFileName)\r
+                        Str = Str.replace('$(WORKSPACE)', os.environ.get('WORKSPACE'))\r
                         if os.path.exists(Str):\r
                             if not os.path.isabs(Str):\r
                                 Str = os.path.abspath(Str)\r
@@ -494,7 +496,7 @@ class FdfParser(object):
                         # file is in the same dir with FDF file\r
                         FullFdf = self.FileName\r
                         if not os.path.isabs(self.FileName):\r
-                            FullFdf = os.path.join(os.environ.get('WORKSPACE'), self.FileName)\r
+                            FullFdf = mws.join(os.environ.get('WORKSPACE'), self.FileName)\r
                 \r
                         IncFileName = os.path.join(os.path.dirname(FullFdf), IncFileName)\r
                     \r