summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common/FdfParserLite.py
diff options
context:
space:
mode:
authorLi YangX <yangx.li@intel.com>2015-10-08 09:27:14 +0000
committerlgao4 <lgao4@Edk2>2015-10-08 09:27:14 +0000
commit05cc51ad5894c8904d0fe5cdcf3f4d0a07dab85d (patch)
tree856943e7687d0a6d39088ca8f87519c753bcc5dc /BaseTools/Source/Python/Common/FdfParserLite.py
parent6fa04d934bd92d12acfa206fce825f3c02120f62 (diff)
downloadedk2-05cc51ad5894c8904d0fe5cdcf3f4d0a07dab85d.tar.gz
edk2-05cc51ad5894c8904d0fe5cdcf3f4d0a07dab85d.tar.bz2
edk2-05cc51ad5894c8904d0fe5cdcf3f4d0a07dab85d.zip
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
Diffstat (limited to 'BaseTools/Source/Python/Common/FdfParserLite.py')
-rw-r--r--BaseTools/Source/Python/Common/FdfParserLite.py6
1 files changed, 4 insertions, 2 deletions
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)