|
From: <js...@us...> - 2011-10-09 07:44:52
|
Revision: 2357
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2357&view=rev
Author: jsu1
Date: 2011-10-09 07:44:46 +0000 (Sun, 09 Oct 2011)
Log Message:
-----------
Update the ?\226?\128?\147d MACRO semantics and empty string expression handle
Signed-off-by: jsu1
Reviewed-by: gikidy
Reviewed-by: yingke
Modified Paths:
--------------
trunk/BaseTools/Source/Python/Common/Expression.py
trunk/BaseTools/Source/Python/GenFds/GenFds.py
trunk/BaseTools/Source/Python/build/build.py
Modified: trunk/BaseTools/Source/Python/Common/Expression.py
===================================================================
--- trunk/BaseTools/Source/Python/Common/Expression.py 2011-10-09 05:32:27 UTC (rev 2356)
+++ trunk/BaseTools/Source/Python/Common/Expression.py 2011-10-09 07:44:46 UTC (rev 2357)
@@ -90,7 +90,10 @@
# $(ARCH) is replaced with "IA32 X64"
RetStr += '"' + Macros[Macro] + '"'
else:
- RetStr += Macros[Macro]
+ if Macros[Macro].strip() != "":
+ RetStr += Macros[Macro]
+ else:
+ RetStr += '""'
RetStr += String[MacroEndPos+1:]
String = RetStr
MacroStartPos = String.find('$(')
@@ -173,13 +176,20 @@
return Val
def __init__(self, Expression, SymbolTable={}):
+ self._NoProcess = False
if type(Expression) != type(''):
self._Expr = Expression
+ self._NoProcess = True
return
self._Expr = ReplaceExprMacro(Expression.strip(),
SymbolTable,
['TARGET', 'TOOL_CHAIN_TAG', 'ARCH'])
+
+ if not self._Expr.strip():
+ self._NoProcess = True
+ return
+
#
# The symbol table including PCD and macro mapping
#
@@ -194,7 +204,7 @@
# Public entry for this class
def __call__(self):
- if type(self._Expr) != type(''):
+ if self._NoProcess:
return self._Expr
Val = self._OrExpr()
Modified: trunk/BaseTools/Source/Python/GenFds/GenFds.py
===================================================================
--- trunk/BaseTools/Source/Python/GenFds/GenFds.py 2011-10-09 05:32:27 UTC (rev 2356)
+++ trunk/BaseTools/Source/Python/GenFds/GenFds.py 2011-10-09 07:44:46 UTC (rev 2357)
@@ -172,7 +172,7 @@
else:
GlobalData.gCommandLineDefines[List[0].strip()] = List[1].strip()
else:
- GlobalData.gCommandLineDefines[List[0].strip()] = ""
+ GlobalData.gCommandLineDefines[List[0].strip()] = "TRUE"
os.environ["WORKSPACE"] = Workspace
"""call Workspace build create database"""
Modified: trunk/BaseTools/Source/Python/build/build.py
===================================================================
--- trunk/BaseTools/Source/Python/build/build.py 2011-10-09 05:32:27 UTC (rev 2356)
+++ trunk/BaseTools/Source/Python/build/build.py 2011-10-09 07:44:46 UTC (rev 2357)
@@ -1625,7 +1625,7 @@
ExtraData=DefineTokenList[0])
if len(DefineTokenList) == 1:
- DefineDict[DefineTokenList[0]] = ""
+ DefineDict[DefineTokenList[0]] = "TRUE"
else:
DefineDict[DefineTokenList[0]] = DefineTokenList[1].strip()
return DefineDict
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|