|
From: <yi...@us...> - 2012-02-23 04:22:00
|
Revision: 2487
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2487&view=rev
Author: yingke
Date: 2012-02-23 04:21:54 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
FeatureFlag and FixAtBuild Pcds in DSC can be used for conditional statements in FDF.
Reviewed-by: jsu1
Signed-off-by: yingke
Modified Paths:
--------------
trunk/BaseTools/Source/Python/Common/GlobalData.py
trunk/BaseTools/Source/Python/GenFds/FdfParser.py
trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py
Modified: trunk/BaseTools/Source/Python/Common/GlobalData.py
===================================================================
--- trunk/BaseTools/Source/Python/Common/GlobalData.py 2012-02-23 03:39:06 UTC (rev 2486)
+++ trunk/BaseTools/Source/Python/Common/GlobalData.py 2012-02-23 04:21:54 UTC (rev 2487)
@@ -26,6 +26,7 @@
gGlobalDefines = {}
gPlatformDefines = {}
+gPlatformPcds = {}
gActivePlatform = None
gCommandLineDefines = {}
gEdkGlobal = {}
Modified: trunk/BaseTools/Source/Python/GenFds/FdfParser.py
===================================================================
--- trunk/BaseTools/Source/Python/GenFds/FdfParser.py 2012-02-23 03:39:06 UTC (rev 2486)
+++ trunk/BaseTools/Source/Python/GenFds/FdfParser.py 2012-02-23 04:21:54 UTC (rev 2487)
@@ -807,6 +807,7 @@
MacroDict = {}
# PCD macro
+ MacroDict.update(GlobalData.gPlatformPcds)
MacroDict.update(self.__PcdDict)
# Lowest priority
Modified: trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py
===================================================================
--- trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py 2012-02-23 03:39:06 UTC (rev 2486)
+++ trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py 2012-02-23 04:21:54 UTC (rev 2487)
@@ -1386,7 +1386,8 @@
try:
ValueList[0] = ValueExpression(PcdValue, self._Macros)(True)
except WrnExpression, Value:
- ValueList[0] = Value.result
+ ValueList[0] = Value.result
+ PcdValue = ValueList[0]
else:
#
# Int*/Boolean VPD PCD
@@ -1412,8 +1413,10 @@
if ValueList[-1] == 'True':
ValueList[-1] = '1'
if ValueList[-1] == 'False':
- ValueList[-1] = '0'
-
+ ValueList[-1] = '0'
+ PcdValue = ValueList[-1]
+ if PcdValue and self._ItemType in [MODEL_PCD_FEATURE_FLAG, MODEL_PCD_FIXED_AT_BUILD]:
+ GlobalData.gPlatformPcds[TAB_SPLIT.join(self._ValueList[0:2])] = PcdValue
self._ValueList[2] = '|'.join(ValueList)
def __ProcessComponent(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|