summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/AutoGen.py
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2016-03-23 14:54:36 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2016-03-23 17:36:09 +0800
commit3570e3324835ba08fa68a1d0bf59290750ff797d (patch)
treeda1b764ccebdd4acb1ecefd5bf4f6ac600ba0c77 /BaseTools/Source/Python/AutoGen/AutoGen.py
parentc7d1e742ecf9c149449c031dbfb4493bfdd0b815 (diff)
downloadedk2-3570e3324835ba08fa68a1d0bf59290750ff797d.tar.gz
edk2-3570e3324835ba08fa68a1d0bf59290750ff797d.tar.bz2
edk2-3570e3324835ba08fa68a1d0bf59290750ff797d.zip
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>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/AutoGen.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 4934c578fa..e9e46c29d7 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -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