BaseTools: Update Build tool to support multiple workspaces
WORKSPACE is still kept. New PACKAGES_PATH is introduced to specify the additional WORKSPACEs. In PACKAGES_PATH, ';' is separator in Windows, ':' is separator in Linux. Build directory is in WORKSPACE. Package, BaseTools and Conf directory will be found from WORKSPACE and PACKAGES_PATH. In implementation, BaseTools adds MultipleWorkspace class for the file path conversion from WORKSPACE and PACKAGES_PATH. Verify two tree layouts. Root\edk2\MdePkg Root\edk2\MdeMdeModulePkg Root\edk2\... 1. set WORKSPACE=Root\edk2 2. set WORKSPACE=Root, and set PACKAGES_PATH=Root\edk2 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Li YangX <yangx.li@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18579 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -41,6 +41,7 @@ from Common.DataType import TAB_BRG_PCD
|
||||
from Common.DataType import TAB_BRG_LIBRARY
|
||||
from Common.DataType import TAB_BACK_SLASH
|
||||
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
||||
|
||||
## Pattern to extract contents in EDK DXS files
|
||||
gDxsDependencyPattern = re.compile(r"DEPENDENCY_START(.+)DEPENDENCY_END", re.DOTALL)
|
||||
@ -1255,7 +1256,7 @@ class FdRegionReport(object):
|
||||
for Pa in Wa.AutoGenObjectList:
|
||||
for ModuleKey in Pa.Platform.Modules:
|
||||
M = Pa.Platform.Modules[ModuleKey].M
|
||||
InfPath = os.path.join(Wa.WorkspaceDir, M.MetaFile.File)
|
||||
InfPath = mws.join(Wa.WorkspaceDir, M.MetaFile.File)
|
||||
self._GuidsDb[M.Guid.upper()] = "%s (%s)" % (M.Module.BaseName, InfPath)
|
||||
|
||||
#
|
||||
@ -1277,7 +1278,7 @@ class FdRegionReport(object):
|
||||
Guid = GuidStructureByteArrayToGuidString(GuidValue).upper()
|
||||
for Section in Ffs.SectionList:
|
||||
try:
|
||||
ModuleSectFile = os.path.join(Wa.WorkspaceDir, Section.SectFileName)
|
||||
ModuleSectFile = mws.join(Wa.WorkspaceDir, Section.SectFileName)
|
||||
self._GuidsDb[Guid] = ModuleSectFile
|
||||
except AttributeError:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user