mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
IntelFsp2Pkg: 41d739e breaks flat tree build
There may be no environment variable PACKAGES_PATH defined in flat tree, then 41d739e breaks flat tree build. This patch is to update GenCfgOpt.py to be compatible with both flat tree and package path build. Cc: Richard Thomaiyar <richard.marian.thomaiyar@intel.com> 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: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Richard Thomaiyar <richard.marian.thomaiyar@intel.com> Tested-by: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
This commit is contained in:
parent
3883e2cb52
commit
60131098f3
@ -524,11 +524,14 @@ EndList
|
|||||||
IncludeFilePath = Match.group(1)
|
IncludeFilePath = Match.group(1)
|
||||||
IncludeFilePath = self.ExpandMacros(IncludeFilePath)
|
IncludeFilePath = self.ExpandMacros(IncludeFilePath)
|
||||||
PackagesPath = os.getenv("PACKAGES_PATH")
|
PackagesPath = os.getenv("PACKAGES_PATH")
|
||||||
|
if PackagesPath:
|
||||||
for PackagePath in PackagesPath.split(os.pathsep):
|
for PackagePath in PackagesPath.split(os.pathsep):
|
||||||
IncludeFilePathAbs = os.path.join(os.path.normpath(PackagePath), os.path.normpath(IncludeFilePath))
|
IncludeFilePathAbs = os.path.join(os.path.normpath(PackagePath), os.path.normpath(IncludeFilePath))
|
||||||
if os.path.exists(IncludeFilePathAbs):
|
if os.path.exists(IncludeFilePathAbs):
|
||||||
IncludeDsc = open(IncludeFilePathAbs, "r")
|
IncludeDsc = open(IncludeFilePathAbs, "r")
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
IncludeDsc = open(IncludeFilePath, "r")
|
||||||
if IncludeDsc == None:
|
if IncludeDsc == None:
|
||||||
print("ERROR: Cannot open file '%s'" % IncludeFilePath)
|
print("ERROR: Cannot open file '%s'" % IncludeFilePath)
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user