BaseTools: AutoGen - clean up access

1) add a property so others can access needed data
2) change GenMake to use property
3) add local variable in GenMake to speed up access

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
Jaben Carsey
2018-06-28 05:27:48 +08:00
committed by Yonghong Zhu
parent 395f333686
commit 7c12d613ba
2 changed files with 118 additions and 115 deletions

View File

@ -2780,7 +2780,7 @@ class ModuleAutoGen(AutoGen):
self._Macro = OrderedDict()
self._Macro["WORKSPACE" ] = self.WorkspaceDir
self._Macro["MODULE_NAME" ] = self.Name
self._Macro["MODULE_NAME_GUID" ] = self._GetUniqueBaseName()
self._Macro["MODULE_NAME_GUID" ] = self.UniqueBaseName
self._Macro["MODULE_GUID" ] = self.Guid
self._Macro["MODULE_VERSION" ] = self.Version
self._Macro["MODULE_TYPE" ] = self.ModuleType
@ -4408,6 +4408,7 @@ class ModuleAutoGen(AutoGen):
BuildCommand = property(_GetBuildCommand)
FixedAtBuildPcds = property(_GetFixedAtBuildPcds)
UniqueBaseName = property(_GetUniqueBaseName)
# This acts like the main() function for the script, unless it is 'import'ed into another script.
if __name__ == '__main__':