From d5d56f1bc5e7bcebd08ad55e940fb907ea0af365 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Thu, 4 Mar 2010 05:29:52 +0000 Subject: 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 --- BaseTools/Source/Python/build/build.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/build/build.py') 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', -- cgit v1.2.3