diff options
author | Yingke Liu <yingke.d.liu@intel.com> | 2015-06-16 04:23:00 +0000 |
---|---|---|
committer | yingke <yingke@Edk2> | 2015-06-16 04:23:00 +0000 |
commit | b442ad5c07c2c8f9a13ce22e74edd9eef91f34e3 (patch) | |
tree | ec96e647a061fcf973d12061d4cadbc4550fb5c4 /BaseTools/Source/Python/AutoGen | |
parent | db61e1630870069f9a3691cacd5cbd15928ec453 (diff) | |
download | edk2-platforms-b442ad5c07c2c8f9a13ce22e74edd9eef91f34e3.tar.xz |
BaseTools: Fixed a bug to generate correct path of PACKAGE_RELATIVE_PATH
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17642 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/GenMake.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py index 1d49a0316d..0342709a3a 100644 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -555,8 +555,16 @@ cleanlib: LibraryMakeCommandList.append(Command)
package_rel_dir = self._AutoGenObject.SourceDir
- if os.sep in package_rel_dir:
- package_rel_dir = package_rel_dir[package_rel_dir.index(os.sep) + 1:]
+ current_dir = self.Macros["WORKSPACE"]
+ found = False
+ while not found and os.sep in package_rel_dir:
+ index = package_rel_dir.index(os.sep)
+ current_dir = os.path.join(current_dir, package_rel_dir[:index])
+ for fl in os.listdir(current_dir):
+ if fl.endswith('.dec'):
+ found = True
+ break
+ package_rel_dir = package_rel_dir[index + 1:]
MakefileTemplateDict = {
"makefile_header" : self._FILE_HEADER_[self._FileType],
|