BaseTools: not include the undefined macro in response file

In last Nmake patch, when we generate the response file, we would replace
all the Macros in the make file. Once there have undefined macro used,
the tool direct report error. In this patch, we use following solution to
resolve the failure.
1. Add all the defined macros into AutoGenObject macro dict
2. For the undefined macros which used in the Make file, when we generate
the response file, we not include this macro, let make phase to handle.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yonghong Zhu
2016-03-23 14:54:36 +08:00
parent c7d1e742ec
commit 3570e33248
2 changed files with 41 additions and 7 deletions

View File

@ -2480,6 +2480,12 @@ class ModuleAutoGen(AutoGen):
self._Macro["DEBUG_DIR" ] = self.DebugDir
self._Macro["DEST_DIR_OUTPUT" ] = self.OutputDir
self._Macro["DEST_DIR_DEBUG" ] = self.DebugDir
self._Macro["PLATFORM_NAME" ] = self.PlatformInfo.Name
self._Macro["PLATFORM_GUID" ] = self.PlatformInfo.Guid
self._Macro["PLATFORM_VERSION" ] = self.PlatformInfo.Version
self._Macro["PLATFORM_RELATIVE_DIR" ] = self.PlatformInfo.SourceDir
self._Macro["PLATFORM_DIR" ] = mws.join(self.WorkspaceDir, self.PlatformInfo.SourceDir)
self._Macro["PLATFORM_OUTPUT_DIR" ] = self.PlatformInfo.OutputDir
return self._Macro
## Return the module build data object