\r
import Common.EdkLogger as EdkLogger\r
import Common.GlobalData as GlobalData\r
+from Common.MultipleWorkspace import MultipleWorkspace as mws\r
\r
from Common.String import *\r
from Common.DataType import *\r
ModuleFile = PathClass(NormPath(Record[0]), GlobalData.gWorkspace, Arch=self._Arch)\r
RecordList = self._RawData[MODEL_META_DATA_COMPONENT_SOURCE_OVERRIDE_PATH, self._Arch, None, ModuleId]\r
if RecordList != []:\r
- SourceOverridePath = os.path.join(GlobalData.gWorkspace, NormPath(RecordList[0][0]))\r
+ SourceOverridePath = mws.join(GlobalData.gWorkspace, NormPath(RecordList[0][0]))\r
\r
# Check if the source override path exists\r
if not os.path.isdir(SourceOverridePath):\r
if self.AutoGenVersion < 0x00010005:\r
Macros["EDK_SOURCE"] = GlobalData.gEcpSource\r
Macros['PROCESSOR'] = self._Arch\r
+ SourceFile = NormPath(Record[0], Macros)\r
+ if SourceFile[0] == os.path.sep:\r
+ SourceFile = mws.join(GlobalData.gWorkspace, SourceFile[1:])\r
# old module source files (Edk)\r
- File = PathClass(NormPath(Record[0], Macros), self._ModuleDir, self._SourceOverridePath,\r
+ File = PathClass(SourceFile, self._ModuleDir, self._SourceOverridePath,\r
'', False, self._Arch, ToolChainFamily, '', TagName, ToolCode)\r
# check the file validation\r
ErrorCode, ErrorInfo = File.Validate(CaseSensitive=False)\r
if File[0] == '.':\r
File = os.path.join(self._ModuleDir, File)\r
else:\r
- File = os.path.join(GlobalData.gWorkspace, File)\r
+ File = mws.join(GlobalData.gWorkspace, File)\r
File = RealPath(os.path.normpath(File))\r
if File:\r
self._Includes.append(File)\r
+ if not File and Record[0].find('EFI_SOURCE') > -1:\r
+ # tricky to regard WorkSpace as EFI_SOURCE\r
+ Macros['EFI_SOURCE'] = GlobalData.gWorkspace\r
+ File = NormPath(Record[0], Macros)\r
+ if File[0] == '.':\r
+ File = os.path.join(self._ModuleDir, File)\r
+ else:\r
+ File = os.path.join(GlobalData.gWorkspace, File)\r
+ File = RealPath(os.path.normpath(File))\r
+ if File:\r
+ self._Includes.append(File)\r
return self._Includes\r
\r
## Retrieve packages this module depends on\r
def __init__(self, DbPath, RenewDb=False):\r
self._DbClosedFlag = False\r
if not DbPath:\r
- DbPath = os.path.normpath(os.path.join(GlobalData.gWorkspace, 'Conf', GlobalData.gDatabasePath))\r
+ DbPath = os.path.normpath(mws.join(GlobalData.gWorkspace, 'Conf', GlobalData.gDatabasePath))\r
\r
# don't create necessary path for db in memory\r
if DbPath != ':memory:':\r