|
From: <qh...@us...> - 2010-03-04 02:48:41
|
Revision: 1911
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1911&view=rev
Author: qhuang8
Date: 2010-03-04 02:48:34 +0000 (Thu, 04 Mar 2010)
Log Message:
-----------
Treat "TARGET" as a special global macro. This can help to use single DSC file for debug/release profile.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/build.py
Modified: trunk/BaseTools/Source/Python/build/build.py
===================================================================
--- trunk/BaseTools/Source/Python/build/build.py 2010-03-04 02:45:19 UTC (rev 1910)
+++ trunk/BaseTools/Source/Python/build/build.py 2010-03-04 02:48:34 UTC (rev 1911)
@@ -738,6 +738,16 @@
# 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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|