BaseTools: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
# This file is required to make Python interpreter treat the directory
|
||||
# as containing package.
|
||||
#
|
||||
# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
@ -20,16 +20,16 @@ from Common.DataType import TAB_WORKSPACE
|
||||
## MultipleWorkspace
|
||||
#
|
||||
# This class manage multiple workspace behavior
|
||||
#
|
||||
#
|
||||
# @param class:
|
||||
#
|
||||
# @var WORKSPACE: defined the current WORKSPACE
|
||||
# @var PACKAGES_PATH: defined the other WORKSAPCE, if current WORKSPACE is invalid, search valid WORKSPACE from PACKAGES_PATH
|
||||
#
|
||||
#
|
||||
class MultipleWorkspace(object):
|
||||
WORKSPACE = ''
|
||||
PACKAGES_PATH = None
|
||||
|
||||
|
||||
## convertPackagePath()
|
||||
#
|
||||
# Convert path to match workspace.
|
||||
@ -59,7 +59,7 @@ class MultipleWorkspace(object):
|
||||
cls.PACKAGES_PATH = [cls.convertPackagePath (Ws, os.path.normpath(Path.strip())) for Path in PackagesPath.split(os.pathsep)]
|
||||
else:
|
||||
cls.PACKAGES_PATH = []
|
||||
|
||||
|
||||
## join()
|
||||
#
|
||||
# rewrite os.path.join function
|
||||
@ -79,7 +79,7 @@ class MultipleWorkspace(object):
|
||||
return Path
|
||||
Path = os.path.join(Ws, *p)
|
||||
return Path
|
||||
|
||||
|
||||
## relpath()
|
||||
#
|
||||
# rewrite os.path.relpath function
|
||||
@ -98,7 +98,7 @@ class MultipleWorkspace(object):
|
||||
if Path.lower().startswith(Ws.lower()):
|
||||
Path = os.path.relpath(Path, Ws)
|
||||
return Path
|
||||
|
||||
|
||||
## getWs()
|
||||
#
|
||||
# get valid workspace for the path
|
||||
@ -117,7 +117,7 @@ class MultipleWorkspace(object):
|
||||
if os.path.exists(absPath):
|
||||
return Pkg
|
||||
return Ws
|
||||
|
||||
|
||||
## handleWsMacro()
|
||||
#
|
||||
# handle the $(WORKSPACE) tag, if current workspace is invalid path relative the tool, replace it.
|
||||
@ -143,7 +143,7 @@ class MultipleWorkspace(object):
|
||||
PathList[i] = str[0:MacroStartPos] + Path
|
||||
PathStr = ' '.join(PathList)
|
||||
return PathStr
|
||||
|
||||
|
||||
## getPkgPath()
|
||||
#
|
||||
# get all package pathes.
|
||||
@ -153,4 +153,4 @@ class MultipleWorkspace(object):
|
||||
@classmethod
|
||||
def getPkgPath(cls):
|
||||
return cls.PACKAGES_PATH
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user