summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/build/build.py
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-04 05:29:52 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-04 05:29:52 +0000
commitd5d56f1bc5e7bcebd08ad55e940fb907ea0af365 (patch)
treebe511cd484b00b289ca068370c305521d422afc5 /BaseTools/Source/Python/build/build.py
parent545312ad92b51501777df57d595f1725170f8940 (diff)
downloadedk2-platforms-d5d56f1bc5e7bcebd08ad55e940fb907ea0af365.tar.xz
Sync EDKII BaseTools to BaseTools project r1911.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10177 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/build/build.py')
-rw-r--r--BaseTools/Source/Python/build/build.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 9705097606..e3a3dd9f3f 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -738,6 +738,16 @@ class Build():
# parse target.txt, tools_def.txt, and platform file
#self.RestoreBuildData()
self.LoadConfiguration()
+
+ #
+ # @attention Treat $(TARGET) in meta data files as special macro when it has only one build target.
+ # This is not a complete support for $(TARGET) macro as it can only support one build target in ONE
+ # invocation of build command. However, it should cover the frequent usage model that $(TARGET) macro
+ # is used in DSC files to specify different libraries & PCD setting for debug/release build.
+ #
+ if len(self.BuildTargetList) == 1:
+ self.Db._GlobalMacros.setdefault("TARGET", self.BuildTargetList[0])
+
self.InitBuild()
# print current build environment and configuration
@@ -1336,7 +1346,6 @@ class Build():
self.FvList,
self.SkuId
)
- self.BuildReport.AddPlatformReport(Wa)
Wa.CreateMakeFile(False)
self.Progress.Stop("done!")
MaList = []
@@ -1345,6 +1354,8 @@ class Build():
if Ma == None: continue
MaList.append(Ma)
self._Build(self.Target, Ma)
+
+ self.BuildReport.AddPlatformReport(Wa, MaList)
if MaList == []:
EdkLogger.error(
'build',