Sync BaseTools Branch (version r2271) to EDKII main trunk.

BaseTool Branch:
  https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/branches/Releases/BaseTools_r2100

Signed-off-by: lgao4
Reviewed-by: hchen30

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12214 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4
2011-08-26 07:46:26 +00:00
parent ba944801a9
commit 4234283c3a
186 changed files with 37663 additions and 3133 deletions

View File

@ -705,7 +705,7 @@ class Build():
# @param SkuId SKU id from command line
#
def __init__(self, Target, WorkspaceDir, Platform, Module, Arch, ToolChain,
BuildTarget, FlashDefinition, FdList=[], FvList=[],
BuildTarget, FlashDefinition, FdList=[], FvList=[], CapList=[],
MakefileType="nmake", SilentMode=False, ThreadNumber=2,
SkipAutoGen=False, Reparse=False, SkuId=None,
ReportFile=None, ReportType=None, UniFlag=None):
@ -720,6 +720,7 @@ class Build():
self.Fdf = FlashDefinition
self.FdList = FdList
self.FvList = FvList
self.CapList = CapList
self.MakefileType = MakefileType
self.SilentMode = SilentMode
self.ThreadNumber = ThreadNumber
@ -999,6 +1000,11 @@ class Build():
try:
#os.rmdir(AutoGenObject.BuildDir)
RemoveDirectory(AutoGenObject.BuildDir, True)
#
# First should close DB.
#
self.Db.Close()
RemoveDirectory(gBuildCacheDir, True)
except WindowsError, X:
EdkLogger.error("build", FILE_DELETE_FAILURE, ExtraData=str(X))
return True
@ -1317,6 +1323,7 @@ class Build():
self.Fdf,
self.FdList,
self.FvList,
self.CapList,
self.SkuId,
self.UniFlag
)
@ -1385,6 +1392,7 @@ class Build():
self.Fdf,
self.FdList,
self.FvList,
self.CapList,
self.SkuId,
self.UniFlag
)
@ -1463,6 +1471,7 @@ class Build():
self.Fdf,
self.FdList,
self.FvList,
self.CapList,
self.SkuId,
self.UniFlag
)
@ -1715,7 +1724,8 @@ def MyOptionParser():
help="The name of FD to be generated. The name must be from [FD] section in FDF file.")
Parser.add_option("-i", "--fv-image", action="append", type="string", dest="FvImage", default=[],
help="The name of FV to be generated. The name must be from [FV] section in FDF file.")
Parser.add_option("-C", "--capsule-image", action="append", type="string", dest="CapName", default=[],
help="The name of Capsule to be generated. The name must be from [Capsule] section in FDF file.")
Parser.add_option("-u", "--skip-autogen", action="store_true", dest="SkipAutoGen", help="Skip AutoGen step.")
Parser.add_option("-e", "--re-parse", action="store_true", dest="Reparse", help="Re-parse all meta-data files.")
@ -1861,7 +1871,7 @@ def Main():
MyBuild = Build(Target, Workspace, Option.PlatformFile, Option.ModuleFile,
Option.TargetArch, Option.ToolChain, Option.BuildTarget,
Option.FdfFile, Option.RomImage, Option.FvImage,
Option.FdfFile, Option.RomImage, Option.FvImage, Option.CapName,
None, Option.SilentMode, Option.ThreadNumber,
Option.SkipAutoGen, Option.Reparse, Option.SkuId,
Option.ReportFile, Option.ReportType, Option.Flag)
@ -1919,14 +1929,19 @@ def Main():
else:
Conclusion = "Failed"
FinishTime = time.time()
BuildDuration = time.strftime("%M:%S", time.gmtime(int(round(FinishTime - StartTime))))
BuildDuration = time.gmtime(int(round(FinishTime - StartTime)))
BuildDurationStr = ""
if BuildDuration.tm_yday > 1:
BuildDurationStr = time.strftime("%H:%M:%S", BuildDuration) + ", %d day(s)"%(BuildDuration.tm_yday - 1)
else:
BuildDurationStr = time.strftime("%H:%M:%S", BuildDuration)
if MyBuild != None:
MyBuild.BuildReport.GenerateReport(BuildDuration)
MyBuild.BuildReport.GenerateReport(BuildDurationStr)
MyBuild.Db.Close()
EdkLogger.SetLevel(EdkLogger.QUIET)
EdkLogger.quiet("\n- %s -" % Conclusion)
EdkLogger.quiet(time.strftime("Build end time: %H:%M:%S, %b.%d %Y", time.localtime()))
EdkLogger.quiet("Build total time: %s\n" % BuildDuration)
EdkLogger.quiet("Build total time: %s\n" % BuildDurationStr)
return ReturnCode
if __name__ == '__main__':