X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FCommon%2FFdfParserLite.py;fp=BaseTools%2FSource%2FPython%2FCommon%2FFdfParserLite.py;h=a0ee249748e1d8bb0e20aba265b74badc5175cbc;hp=54a60a7e8f81c1655c434b29f776edb88ad74b77;hb=05cc51ad5894c8904d0fe5cdcf3f4d0a07dab85d;hpb=6fa04d934bd92d12acfa206fce825f3c02120f62 diff --git a/BaseTools/Source/Python/Common/FdfParserLite.py b/BaseTools/Source/Python/Common/FdfParserLite.py index 54a60a7e8f..a0ee249748 100644 --- a/BaseTools/Source/Python/Common/FdfParserLite.py +++ b/BaseTools/Source/Python/Common/FdfParserLite.py @@ -20,6 +20,7 @@ import Common.LongFilePathOs as os import CommonDataClass.FdfClass from Common.LongFilePathSupport import OpenLongFilePath as open +from Common.MultipleWorkspace import MultipleWorkspace as mws ##define T_CHAR_SPACE ' ' ##define T_CHAR_NULL '\0' @@ -485,7 +486,8 @@ class FdfParser(object): IncFileName = self.__Token if not os.path.isabs(IncFileName): if IncFileName.startswith('$(WORKSPACE)'): - Str = IncFileName.replace('$(WORKSPACE)', os.environ.get('WORKSPACE')) + Str = mws.handleWsMacro(IncFileName) + Str = Str.replace('$(WORKSPACE)', os.environ.get('WORKSPACE')) if os.path.exists(Str): if not os.path.isabs(Str): Str = os.path.abspath(Str) @@ -494,7 +496,7 @@ class FdfParser(object): # file is in the same dir with FDF file FullFdf = self.FileName if not os.path.isabs(self.FileName): - FullFdf = os.path.join(os.environ.get('WORKSPACE'), self.FileName) + FullFdf = mws.join(os.environ.get('WORKSPACE'), self.FileName) IncFileName = os.path.join(os.path.dirname(FullFdf), IncFileName)