mirror of https://github.com/acidanthera/audk.git
IntelFsp2Pkg: Add PACKAGES_PATH support
Add PACKAGES_PATH support in GenCfgOpt.py Cc: Maurice Ma <maurice.ma@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Richard Thomaiyar <richard.marian.thomaiyar@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
This commit is contained in:
parent
6fee83fbca
commit
41d739e4ec
|
@ -523,9 +523,13 @@ EndList
|
||||||
if Match:
|
if Match:
|
||||||
IncludeFilePath = Match.group(1)
|
IncludeFilePath = Match.group(1)
|
||||||
IncludeFilePath = self.ExpandMacros(IncludeFilePath)
|
IncludeFilePath = self.ExpandMacros(IncludeFilePath)
|
||||||
try:
|
PackagesPath = os.getenv("PACKAGES_PATH")
|
||||||
IncludeDsc = open(IncludeFilePath, "r")
|
for PackagePath in PackagesPath.split(os.pathsep):
|
||||||
except:
|
IncludeFilePathAbs = os.path.join(os.path.normpath(PackagePath), os.path.normpath(IncludeFilePath))
|
||||||
|
if os.path.exists(IncludeFilePathAbs):
|
||||||
|
IncludeDsc = open(IncludeFilePathAbs, "r")
|
||||||
|
break
|
||||||
|
if IncludeDsc == None:
|
||||||
print("ERROR: Cannot open file '%s'" % IncludeFilePath)
|
print("ERROR: Cannot open file '%s'" % IncludeFilePath)
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
NewDscLines = IncludeDsc.readlines()
|
NewDscLines = IncludeDsc.readlines()
|
||||||
|
|
Loading…
Reference in New Issue