summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-05-18 05:04:32 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-05-18 05:04:32 +0000
commit40d841f6a8f84e75409178e19e69b95e01bada0f (patch)
tree75b50fad9fc4190bf505ac99c283064ec8c79f2b /BaseTools/Source/Python
parent3dc8585e0a9fd4b2cb383f3ceb4961c7a88a8e71 (diff)
Sync EDKII BaseTools to BaseTools project r1971
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10502 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py8
-rw-r--r--BaseTools/Source/Python/AutoGen/BuildEngine.py4
-rw-r--r--BaseTools/Source/Python/AutoGen/GenC.py4
-rw-r--r--BaseTools/Source/Python/AutoGen/GenDepex.py4
-rw-r--r--BaseTools/Source/Python/AutoGen/GenMake.py4
-rw-r--r--BaseTools/Source/Python/AutoGen/StrGather.py4
-rw-r--r--BaseTools/Source/Python/AutoGen/UniClassObject.py15
-rw-r--r--BaseTools/Source/Python/AutoGen/__init__.py4
-rw-r--r--BaseTools/Source/Python/Common/BuildToolError.py4
-rw-r--r--BaseTools/Source/Python/Common/DataType.py4
-rw-r--r--BaseTools/Source/Python/Common/Database.py4
-rw-r--r--BaseTools/Source/Python/Common/DecClassObject.py4
-rw-r--r--BaseTools/Source/Python/Common/DecClassObjectLight.py4
-rw-r--r--BaseTools/Source/Python/Common/Dictionary.py4
-rw-r--r--BaseTools/Source/Python/Common/DscClassObject.py4
-rw-r--r--BaseTools/Source/Python/Common/EdkIIWorkspace.py4
-rw-r--r--BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py4
-rw-r--r--BaseTools/Source/Python/Common/EdkLogger.py4
-rw-r--r--BaseTools/Source/Python/Common/FdfClassObject.py4
-rw-r--r--BaseTools/Source/Python/Common/FdfParserLite.py4
-rw-r--r--BaseTools/Source/Python/Common/GlobalData.py4
-rw-r--r--BaseTools/Source/Python/Common/Identification.py4
-rw-r--r--BaseTools/Source/Python/Common/InfClassObject.py4
-rw-r--r--BaseTools/Source/Python/Common/InfClassObjectLight.py4
-rw-r--r--BaseTools/Source/Python/Common/MigrationUtilities.py4
-rw-r--r--BaseTools/Source/Python/Common/Misc.py11
-rw-r--r--BaseTools/Source/Python/Common/Parsing.py4
-rw-r--r--BaseTools/Source/Python/Common/String.py4
-rw-r--r--BaseTools/Source/Python/Common/TargetTxtClassObject.py4
-rw-r--r--BaseTools/Source/Python/Common/ToolDefClassObject.py4
-rw-r--r--BaseTools/Source/Python/Common/XmlParser.py4
-rw-r--r--BaseTools/Source/Python/Common/XmlRoutines.py4
-rw-r--r--BaseTools/Source/Python/Common/__init__.py4
-rw-r--r--BaseTools/Source/Python/CommonDataClass/CommonClass.py4
-rw-r--r--BaseTools/Source/Python/CommonDataClass/DataClass.py4
-rw-r--r--BaseTools/Source/Python/CommonDataClass/DistributionPackageClass.py4
-rw-r--r--BaseTools/Source/Python/CommonDataClass/FdfClass.py4
-rw-r--r--BaseTools/Source/Python/CommonDataClass/ModuleClass.py4
-rw-r--r--BaseTools/Source/Python/CommonDataClass/PackageClass.py4
-rw-r--r--BaseTools/Source/Python/CommonDataClass/PlatformClass.py4
-rw-r--r--BaseTools/Source/Python/CommonDataClass/__init__.py4
-rw-r--r--BaseTools/Source/Python/Ecc/C.g4
-rw-r--r--BaseTools/Source/Python/Ecc/CLexer.py2
-rw-r--r--BaseTools/Source/Python/Ecc/CParser.py2
-rw-r--r--BaseTools/Source/Python/Ecc/Check.py49
-rw-r--r--BaseTools/Source/Python/Ecc/CodeFragment.py4
-rw-r--r--BaseTools/Source/Python/Ecc/CodeFragmentCollector.py4
-rw-r--r--BaseTools/Source/Python/Ecc/Configuration.py8
-rw-r--r--BaseTools/Source/Python/Ecc/Database.py4
-rw-r--r--BaseTools/Source/Python/Ecc/Ecc.py4
-rw-r--r--BaseTools/Source/Python/Ecc/EccGlobalData.py4
-rw-r--r--BaseTools/Source/Python/Ecc/EccToolError.py7
-rw-r--r--BaseTools/Source/Python/Ecc/Exception.py4
-rw-r--r--BaseTools/Source/Python/Ecc/FileProfile.py4
-rw-r--r--BaseTools/Source/Python/Ecc/MetaDataParser.py4
-rw-r--r--BaseTools/Source/Python/Ecc/ParserWarning.py4
-rw-r--r--BaseTools/Source/Python/Ecc/__init__.py4
-rw-r--r--BaseTools/Source/Python/Ecc/c.py4
-rw-r--r--BaseTools/Source/Python/Ecc/config.ini6
-rw-r--r--BaseTools/Source/Python/Ecc/exception.xml3
-rw-r--r--BaseTools/Source/Python/Eot/CLexer.py2
-rw-r--r--BaseTools/Source/Python/Eot/CParser.py2
-rw-r--r--BaseTools/Source/Python/Eot/CodeFragment.py4
-rw-r--r--BaseTools/Source/Python/Eot/CodeFragmentCollector.py4
-rw-r--r--BaseTools/Source/Python/Eot/Database.py4
-rw-r--r--BaseTools/Source/Python/Eot/Eot.py4
-rw-r--r--BaseTools/Source/Python/Eot/EotGlobalData.py4
-rw-r--r--BaseTools/Source/Python/Eot/EotToolError.py4
-rw-r--r--BaseTools/Source/Python/Eot/FileProfile.py4
-rw-r--r--BaseTools/Source/Python/Eot/FvImage.py4
-rw-r--r--BaseTools/Source/Python/Eot/InfParserLite.py4
-rw-r--r--BaseTools/Source/Python/Eot/Parser.py7
-rw-r--r--BaseTools/Source/Python/Eot/ParserWarning.py4
-rw-r--r--BaseTools/Source/Python/Eot/Report.py4
-rw-r--r--BaseTools/Source/Python/Eot/__init__.py4
-rw-r--r--BaseTools/Source/Python/Eot/c.py9
-rw-r--r--BaseTools/Source/Python/Fdb/__init__.py4
-rw-r--r--BaseTools/Source/Python/FixFlash/__init__.py4
-rw-r--r--BaseTools/Source/Python/GNUmakefile4
-rw-r--r--BaseTools/Source/Python/GenFds/AprioriSection.py4
-rw-r--r--BaseTools/Source/Python/GenFds/Attribute.py4
-rw-r--r--BaseTools/Source/Python/GenFds/Capsule.py4
-rw-r--r--BaseTools/Source/Python/GenFds/CapsuleData.py4
-rw-r--r--BaseTools/Source/Python/GenFds/ComponentStatement.py4
-rw-r--r--BaseTools/Source/Python/GenFds/CompressSection.py4
-rw-r--r--BaseTools/Source/Python/GenFds/DataSection.py4
-rw-r--r--BaseTools/Source/Python/GenFds/DepexSection.py4
-rw-r--r--BaseTools/Source/Python/GenFds/EfiSection.py4
-rw-r--r--BaseTools/Source/Python/GenFds/Fd.py4
-rw-r--r--BaseTools/Source/Python/GenFds/FdfParser.py4
-rw-r--r--BaseTools/Source/Python/GenFds/Ffs.py4
-rw-r--r--BaseTools/Source/Python/GenFds/FfsFileStatement.py4
-rw-r--r--BaseTools/Source/Python/GenFds/FfsInfStatement.py4
-rw-r--r--BaseTools/Source/Python/GenFds/Fv.py4
-rw-r--r--BaseTools/Source/Python/GenFds/FvImageSection.py4
-rw-r--r--BaseTools/Source/Python/GenFds/GenFds.py10
-rw-r--r--BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py4
-rw-r--r--BaseTools/Source/Python/GenFds/GuidSection.py4
-rw-r--r--BaseTools/Source/Python/GenFds/OptRomFileStatement.py4
-rw-r--r--BaseTools/Source/Python/GenFds/OptRomInfStatement.py4
-rw-r--r--BaseTools/Source/Python/GenFds/OptionRom.py4
-rw-r--r--BaseTools/Source/Python/GenFds/Region.py4
-rw-r--r--BaseTools/Source/Python/GenFds/Rule.py4
-rw-r--r--BaseTools/Source/Python/GenFds/RuleComplexFile.py4
-rw-r--r--BaseTools/Source/Python/GenFds/RuleSimpleFile.py4
-rw-r--r--BaseTools/Source/Python/GenFds/Section.py4
-rw-r--r--BaseTools/Source/Python/GenFds/UiSection.py4
-rw-r--r--BaseTools/Source/Python/GenFds/VerSection.py4
-rw-r--r--BaseTools/Source/Python/GenFds/Vtf.py4
-rw-r--r--BaseTools/Source/Python/GenFds/__init__.py4
-rw-r--r--BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py4
-rw-r--r--BaseTools/Source/Python/GenPatchPcdTable/__init__.py4
-rw-r--r--BaseTools/Source/Python/Makefile4
-rw-r--r--BaseTools/Source/Python/MigrationMsa2Inf/AutoGenExterns.py4
-rw-r--r--BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py4
-rw-r--r--BaseTools/Source/Python/MigrationMsa2Inf/__init__.py4
-rw-r--r--BaseTools/Source/Python/MkBOM/__init__.py4
-rw-r--r--BaseTools/Source/Python/PackagingTool/DependencyRules.py4
-rw-r--r--BaseTools/Source/Python/PackagingTool/InstallPkg.py4
-rw-r--r--BaseTools/Source/Python/PackagingTool/IpiDb.py4
-rw-r--r--BaseTools/Source/Python/PackagingTool/MkPkg.py4
-rw-r--r--BaseTools/Source/Python/PackagingTool/PackageFile.py4
-rw-r--r--BaseTools/Source/Python/PackagingTool/RmPkg.py4
-rw-r--r--BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py4
-rw-r--r--BaseTools/Source/Python/PatchPcdValue/__init__.py4
-rw-r--r--BaseTools/Source/Python/Table/Table.py4
-rw-r--r--BaseTools/Source/Python/Table/TableDataModel.py4
-rw-r--r--BaseTools/Source/Python/Table/TableDec.py4
-rw-r--r--BaseTools/Source/Python/Table/TableDsc.py4
-rw-r--r--BaseTools/Source/Python/Table/TableEotReport.py4
-rw-r--r--BaseTools/Source/Python/Table/TableFdf.py4
-rw-r--r--BaseTools/Source/Python/Table/TableFile.py4
-rw-r--r--BaseTools/Source/Python/Table/TableFunction.py4
-rw-r--r--BaseTools/Source/Python/Table/TableIdentifier.py4
-rw-r--r--BaseTools/Source/Python/Table/TableInf.py4
-rw-r--r--BaseTools/Source/Python/Table/TablePcd.py4
-rw-r--r--BaseTools/Source/Python/Table/TableQuery.py4
-rw-r--r--BaseTools/Source/Python/Table/TableReport.py6
-rw-r--r--BaseTools/Source/Python/Table/__init__.py4
-rw-r--r--BaseTools/Source/Python/TargetTool/TargetTool.py4
-rw-r--r--BaseTools/Source/Python/TargetTool/__init__.py4
-rw-r--r--BaseTools/Source/Python/Trim/Trim.py7
-rw-r--r--BaseTools/Source/Python/Workspace/BuildClassObject.py4
-rw-r--r--BaseTools/Source/Python/Workspace/MetaDataTable.py4
-rw-r--r--BaseTools/Source/Python/Workspace/MetaFileParser.py4
-rw-r--r--BaseTools/Source/Python/Workspace/MetaFileTable.py4
-rw-r--r--BaseTools/Source/Python/Workspace/WorkspaceDatabase.py4
-rw-r--r--BaseTools/Source/Python/Workspace/__init__.py4
-rw-r--r--BaseTools/Source/Python/build/BuildReport.py35
-rw-r--r--BaseTools/Source/Python/build/__init__.py4
-rw-r--r--BaseTools/Source/Python/build/build.py12
-rw-r--r--BaseTools/Source/Python/fpd2dsc/EdkIIWorkspaceGuidsInfo.py4
-rw-r--r--BaseTools/Source/Python/fpd2dsc/LoadFpd.py4
-rw-r--r--BaseTools/Source/Python/fpd2dsc/MigrationUtilities.py4
-rw-r--r--BaseTools/Source/Python/fpd2dsc/StoreDsc.py4
-rw-r--r--BaseTools/Source/Python/fpd2dsc/__init__.py4
-rw-r--r--BaseTools/Source/Python/fpd2dsc/fpd2dsc.py4
-rw-r--r--BaseTools/Source/Python/msa2inf/ConvertModule.py4
-rw-r--r--BaseTools/Source/Python/msa2inf/EdkIIWorkspaceGuidsInfo.py4
-rw-r--r--BaseTools/Source/Python/msa2inf/LoadMsa.py4
-rw-r--r--BaseTools/Source/Python/msa2inf/Msa2Inf.py4
-rw-r--r--BaseTools/Source/Python/msa2inf/StoreInf.py4
-rw-r--r--BaseTools/Source/Python/msa2inf/__init__.py4
-rw-r--r--BaseTools/Source/Python/sitecustomize.py4
-rw-r--r--BaseTools/Source/Python/spd2dec/ConvertPackage.py4
-rw-r--r--BaseTools/Source/Python/spd2dec/LoadSpd.py4
-rw-r--r--BaseTools/Source/Python/spd2dec/Spd2Dec.py4
-rw-r--r--BaseTools/Source/Python/spd2dec/StoreDec.py4
-rw-r--r--BaseTools/Source/Python/spd2dec/__init__.py4
169 files changed, 437 insertions, 364 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index fa434e810..3b8024c19 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -1,8 +1,8 @@
## @file
# Generate AutoGen.h, AutoGen.c and *.depex files
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
@@ -1953,8 +1953,10 @@ class ModuleAutoGen(AutoGen):
return
for ModuleType in self.DepexList:
- if len(self.DepexList[ModuleType]) == 0:
+ # Ignore empty [depex] section or [depex] section for "USER_DEFINED" module
+ if len(self.DepexList[ModuleType]) == 0 or ModuleType == "USER_DEFINED":
continue
+
Dpx = GenDepex.DependencyExpression(self.DepexList[ModuleType], ModuleType, True)
DpxFile = gAutoGenDepexFileName % {"module_name" : self.Name}
diff --git a/BaseTools/Source/Python/AutoGen/BuildEngine.py b/BaseTools/Source/Python/AutoGen/BuildEngine.py
index cbe7d60f3..73b4a9741 100644
--- a/BaseTools/Source/Python/AutoGen/BuildEngine.py
+++ b/BaseTools/Source/Python/AutoGen/BuildEngine.py
@@ -1,8 +1,8 @@
## @file
# The engine for building files
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py
index a913cf4e5..824e5e058 100644
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -1,8 +1,8 @@
## @file
# Routines for generating AutoGen.h and AutoGen.c
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/AutoGen/GenDepex.py b/BaseTools/Source/Python/AutoGen/GenDepex.py
index f456f0d25..b652051ac 100644
--- a/BaseTools/Source/Python/AutoGen/GenDepex.py
+++ b/BaseTools/Source/Python/AutoGen/GenDepex.py
@@ -1,8 +1,8 @@
## @file
# This file is used to generate DEPEX file for module's dependency expression
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py
index b58d0c641..e3f5c2b6e 100644
--- a/BaseTools/Source/Python/AutoGen/GenMake.py
+++ b/BaseTools/Source/Python/AutoGen/GenMake.py
@@ -1,8 +1,8 @@
## @file
# Create makefile for MS nmake and GNU make
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/AutoGen/StrGather.py b/BaseTools/Source/Python/AutoGen/StrGather.py
index 903ac3cd0..1759da72d 100644
--- a/BaseTools/Source/Python/AutoGen/StrGather.py
+++ b/BaseTools/Source/Python/AutoGen/StrGather.py
@@ -1,5 +1,5 @@
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py
index 717c10f26..8f929a33c 100644
--- a/BaseTools/Source/Python/AutoGen/UniClassObject.py
+++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py
@@ -1,5 +1,5 @@
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
@@ -15,6 +15,7 @@
# Import Modules
#
import os, codecs, re
+import distutils.util
import Common.EdkLogger as EdkLogger
from Common.BuildToolError import *
from Common.String import GetLineNo
@@ -125,6 +126,8 @@ def GetLanguageCode(LangName, IsCompatibleMode, File):
else:
EdkLogger.error("Unicode File Parser", FORMAT_INVALID, "Invalid ISO 639-2 language code : %s" % LangName, File)
+ if (LangName[0] == 'X' or LangName[0] == 'x') and LangName[1] == '-':
+ return LangName
if length == 2:
if LangName.isalpha():
return LangName
@@ -193,20 +196,20 @@ class UniFileClassObject(object):
# Get Language definition
#
def GetLangDef(self, File, Line):
- Lang = Line.split(u"//")[0].split()
+ Lang = distutils.util.split_quoted((Line.split(u"//")[0]))
if len(Lang) != 3:
try:
- FileIn = codecs.open(File, mode='rb', encoding='utf-16').read()
+ FileIn = codecs.open(File.Path, mode='rb', encoding='utf-16').read()
except UnicodeError, X:
EdkLogger.error("build", FILE_READ_FAILURE, "File read failure: %s" % str(X), ExtraData=File);
except:
EdkLogger.error("build", FILE_OPEN_FAILURE, ExtraData=File);
LineNo = GetLineNo(FileIn, Line, False)
EdkLogger.error("Unicode File Parser", PARSER_ERROR, "Wrong language definition",
- ExtraData="""%s\n\t*Correct format is like '#langdef eng "English"'""" % Line, File = File, Line = LineNo)
+ ExtraData="""%s\n\t*Correct format is like '#langdef en-US "English"'""" % Line, File = File, Line = LineNo)
else:
LangName = GetLanguageCode(Lang[1], self.IsCompatibleMode, self.File)
- LangPrintName = Lang[2][1:-1]
+ LangPrintName = Lang[2]
IsLangInDef = False
for Item in self.LanguageDef:
diff --git a/BaseTools/Source/Python/AutoGen/__init__.py b/BaseTools/Source/Python/AutoGen/__init__.py
index 737cb0c9a..d2de42573 100644
--- a/BaseTools/Source/Python/AutoGen/__init__.py
+++ b/BaseTools/Source/Python/AutoGen/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/BuildToolError.py b/BaseTools/Source/Python/Common/BuildToolError.py
index a49de4640..9986ba2b0 100644
--- a/BaseTools/Source/Python/Common/BuildToolError.py
+++ b/BaseTools/Source/Python/Common/BuildToolError.py
@@ -1,8 +1,8 @@
## @file
# Standardized Error Hanlding infrastructures.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/DataType.py b/BaseTools/Source/Python/Common/DataType.py
index dd33380a1..982d710ce 100644
--- a/BaseTools/Source/Python/Common/DataType.py
+++ b/BaseTools/Source/Python/Common/DataType.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define common static strings used by INF/DEC/DSC files
#
-# Copyright (c) 2007 ~ 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/Database.py b/BaseTools/Source/Python/Common/Database.py
index e645337a3..5c0a79f29 100644
--- a/BaseTools/Source/Python/Common/Database.py
+++ b/BaseTools/Source/Python/Common/Database.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create a database used by ECC tool
#
-# Copyright (c) 2007 ~ 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/DecClassObject.py b/BaseTools/Source/Python/Common/DecClassObject.py
index b95ff621c..ffa485979 100644
--- a/BaseTools/Source/Python/Common/DecClassObject.py
+++ b/BaseTools/Source/Python/Common/DecClassObject.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define each component of DEC file
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/DecClassObjectLight.py b/BaseTools/Source/Python/Common/DecClassObjectLight.py
index 7c572a56f..1982dd05a 100644
--- a/BaseTools/Source/Python/Common/DecClassObjectLight.py
+++ b/BaseTools/Source/Python/Common/DecClassObjectLight.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define each component of DEC file in light mode
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/Dictionary.py b/BaseTools/Source/Python/Common/Dictionary.py
index 3c968f5ec..e3460e989 100644
--- a/BaseTools/Source/Python/Common/Dictionary.py
+++ b/BaseTools/Source/Python/Common/Dictionary.py
@@ -1,8 +1,8 @@
## @file
# Define a dictionary structure
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/DscClassObject.py b/BaseTools/Source/Python/Common/DscClassObject.py
index c25580ac3..943bc6948 100644
--- a/BaseTools/Source/Python/Common/DscClassObject.py
+++ b/BaseTools/Source/Python/Common/DscClassObject.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define each component of DSC file
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/EdkIIWorkspace.py b/BaseTools/Source/Python/Common/EdkIIWorkspace.py
index a494e814a..d041b3541 100644
--- a/BaseTools/Source/Python/Common/EdkIIWorkspace.py
+++ b/BaseTools/Source/Python/Common/EdkIIWorkspace.py
@@ -1,8 +1,8 @@
## @file
# This is the base class for applications that operate on an EDK II Workspace
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py b/BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py
index c33b9bff0..69a67eda3 100644
--- a/BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py
+++ b/BaseTools/Source/Python/Common/EdkIIWorkspaceBuild.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define each component of the build database
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/EdkLogger.py b/BaseTools/Source/Python/Common/EdkLogger.py
index ce4cfa14b..a3bcb3a14 100644
--- a/BaseTools/Source/Python/Common/EdkLogger.py
+++ b/BaseTools/Source/Python/Common/EdkLogger.py
@@ -1,8 +1,8 @@
## @file
# This file implements the log mechanism for Python tools.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/FdfClassObject.py b/BaseTools/Source/Python/Common/FdfClassObject.py
index e0df1c20c..3e7d44954 100644
--- a/BaseTools/Source/Python/Common/FdfClassObject.py
+++ b/BaseTools/Source/Python/Common/FdfClassObject.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define each component of FDF file
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/FdfParserLite.py b/BaseTools/Source/Python/Common/FdfParserLite.py
index b181e65d1..5d0fd7f67 100644
--- a/BaseTools/Source/Python/Common/FdfParserLite.py
+++ b/BaseTools/Source/Python/Common/FdfParserLite.py
@@ -1,9 +1,9 @@
## @file
# parse FDF file
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/GlobalData.py b/BaseTools/Source/Python/Common/GlobalData.py
index d56152ec8..6c7f08581 100644
--- a/BaseTools/Source/Python/Common/GlobalData.py
+++ b/BaseTools/Source/Python/Common/GlobalData.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define common static strings used by INF/DEC/DSC files
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/Identification.py b/BaseTools/Source/Python/Common/Identification.py
index a9b2f33d5..f43150dfc 100644
--- a/BaseTools/Source/Python/Common/Identification.py
+++ b/BaseTools/Source/Python/Common/Identification.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define the identification of INF/DEC/DSC files
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/InfClassObject.py b/BaseTools/Source/Python/Common/InfClassObject.py
index 7127cc5cf..e774d80d6 100644
--- a/BaseTools/Source/Python/Common/InfClassObject.py
+++ b/BaseTools/Source/Python/Common/InfClassObject.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define each component of INF file
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/InfClassObjectLight.py b/BaseTools/Source/Python/Common/InfClassObjectLight.py
index 179b75e28..020addfdb 100644
--- a/BaseTools/Source/Python/Common/InfClassObjectLight.py
+++ b/BaseTools/Source/Python/Common/InfClassObjectLight.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define each component of INF file
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/MigrationUtilities.py b/BaseTools/Source/Python/Common/MigrationUtilities.py
index 8573f0b69..b15daa844 100644
--- a/BaseTools/Source/Python/Common/MigrationUtilities.py
+++ b/BaseTools/Source/Python/Common/MigrationUtilities.py
@@ -1,8 +1,8 @@
## @file
# Contains several utilitities shared by migration tools.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index 546dd3777..126985fda 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -1,8 +1,8 @@
## @file
# Common routines used by all tools
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
@@ -1322,7 +1322,12 @@ class PathClass(object):
RealFile, RealRoot = RealPath2(self.File, self.Root, self.AlterRoot)
if not RealRoot and not RealFile:
- return FILE_NOT_FOUND, self.File
+ RealFile = self.File
+ if self.AlterRoot:
+ RealFile = os.path.join(self.AlterRoot, self.File)
+ elif self.Root:
+ RealFile = os.path.join(self.Root, self.File)
+ return FILE_NOT_FOUND, os.path.join(self.AlterRoot, RealFile)
ErrorCode = 0
ErrorInfo = ''
diff --git a/BaseTools/Source/Python/Common/Parsing.py b/BaseTools/Source/Python/Common/Parsing.py
index 3884b0521..ce1e60338 100644
--- a/BaseTools/Source/Python/Common/Parsing.py
+++ b/BaseTools/Source/Python/Common/Parsing.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define common parsing related functions used in parsing INF/DEC/DSC process
#
-# Copyright (c) 2008 ~ 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/String.py b/BaseTools/Source/Python/Common/String.py
index 5da0cacfb..1f199fe2c 100644
--- a/BaseTools/Source/Python/Common/String.py
+++ b/BaseTools/Source/Python/Common/String.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define common string related functions used in parsing process
#
-# Copyright (c) 2007 ~ 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/TargetTxtClassObject.py b/BaseTools/Source/Python/Common/TargetTxtClassObject.py
index 70178f54c..fc5d589a5 100644
--- a/BaseTools/Source/Python/Common/TargetTxtClassObject.py
+++ b/BaseTools/Source/Python/Common/TargetTxtClassObject.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define each component of Target.txt file
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/ToolDefClassObject.py b/BaseTools/Source/Python/Common/ToolDefClassObject.py
index 5a9a3096b..549f76cee 100644
--- a/BaseTools/Source/Python/Common/ToolDefClassObject.py
+++ b/BaseTools/Source/Python/Common/ToolDefClassObject.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define each component of tools_def.txt file
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/XmlParser.py b/BaseTools/Source/Python/Common/XmlParser.py
index 4d6011592..dcafb5f15 100644
--- a/BaseTools/Source/Python/Common/XmlParser.py
+++ b/BaseTools/Source/Python/Common/XmlParser.py
@@ -1,8 +1,8 @@
## @file
# This file is used to parse a xml file of .PKG file
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/XmlRoutines.py b/BaseTools/Source/Python/Common/XmlRoutines.py
index e5fedae83..582306705 100644
--- a/BaseTools/Source/Python/Common/XmlRoutines.py
+++ b/BaseTools/Source/Python/Common/XmlRoutines.py
@@ -2,8 +2,8 @@
# This is an XML API that uses a syntax similar to XPath, but it is written in
# standard python so that no extra python packages are required to use it.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Common/__init__.py b/BaseTools/Source/Python/Common/__init__.py
index b289a2b0d..d8a96f9bf 100644
--- a/BaseTools/Source/Python/Common/__init__.py
+++ b/BaseTools/Source/Python/Common/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/CommonDataClass/CommonClass.py b/BaseTools/Source/Python/CommonDataClass/CommonClass.py
index e226f1b0d..509601007 100644
--- a/BaseTools/Source/Python/CommonDataClass/CommonClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/CommonClass.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define common items of class object
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/CommonDataClass/DataClass.py b/BaseTools/Source/Python/CommonDataClass/DataClass.py
index 00f4be833..a0eddc236 100644
--- a/BaseTools/Source/Python/CommonDataClass/DataClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/DataClass.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define class for data sturcture used in ECC
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/CommonDataClass/DistributionPackageClass.py b/BaseTools/Source/Python/CommonDataClass/DistributionPackageClass.py
index cd8bd4cb7..b43329945 100644
--- a/BaseTools/Source/Python/CommonDataClass/DistributionPackageClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/DistributionPackageClass.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define a class object to describe a distribution package
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/CommonDataClass/FdfClass.py b/BaseTools/Source/Python/CommonDataClass/FdfClass.py
index a6953b8c5..a459cad8b 100644
--- a/BaseTools/Source/Python/CommonDataClass/FdfClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/FdfClass.py
@@ -1,9 +1,9 @@
## @file
# classes represent data in FDF
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/CommonDataClass/ModuleClass.py b/BaseTools/Source/Python/CommonDataClass/ModuleClass.py
index 350350bdf..399d32875 100644
--- a/BaseTools/Source/Python/CommonDataClass/ModuleClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/ModuleClass.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define a class object to describe a module
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/CommonDataClass/PackageClass.py b/BaseTools/Source/Python/CommonDataClass/PackageClass.py
index 1382b8083..82e7394ce 100644
--- a/BaseTools/Source/Python/CommonDataClass/PackageClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/PackageClass.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define a class object to describe a package
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/CommonDataClass/PlatformClass.py b/BaseTools/Source/Python/CommonDataClass/PlatformClass.py
index 1966fb9f8..46329ba1d 100644
--- a/BaseTools/Source/Python/CommonDataClass/PlatformClass.py
+++ b/BaseTools/Source/Python/CommonDataClass/PlatformClass.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define a class object to describe a platform
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/CommonDataClass/__init__.py b/BaseTools/Source/Python/CommonDataClass/__init__.py
index 8f81773a9..5c565408b 100644
--- a/BaseTools/Source/Python/CommonDataClass/__init__.py
+++ b/BaseTools/Source/Python/CommonDataClass/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Ecc/C.g b/BaseTools/Source/Python/Ecc/C.g
index a34f5902b..e344088f3 100644
--- a/BaseTools/Source/Python/Ecc/C.g
+++ b/BaseTools/Source/Python/Ecc/C.g
@@ -1,8 +1,8 @@
/* @file
This file is used to be the grammar file of ECC tool
- Copyright (c) 2009 - 2010, Intel Corporation
- All rights reserved. This program and the accompanying materials
+ Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Ecc/CLexer.py b/BaseTools/Source/Python/Ecc/CLexer.py
index 947ac4c8e..a72d4ee3c 100644
--- a/BaseTools/Source/Python/Ecc/CLexer.py
+++ b/BaseTools/Source/Python/Ecc/CLexer.py
@@ -10,7 +10,7 @@ from antlr3.compat import set, frozenset
# This file is generated by running:
# java org.antlr.Tool C.g
#
-# Copyright (c) 2009 - 2010, Intel Corporation All rights reserved.
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this
diff --git a/BaseTools/Source/Python/Ecc/CParser.py b/BaseTools/Source/Python/Ecc/CParser.py
index e56a79a43..511d429f2 100644
--- a/BaseTools/Source/Python/Ecc/CParser.py
+++ b/BaseTools/Source/Python/Ecc/CParser.py
@@ -10,7 +10,7 @@ from antlr3.compat import set, frozenset
# This file is generated by running:
# java org.antlr.Tool C.g
#
-# Copyright (c) 2009 - 2010, Intel Corporation All rights reserved.
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this
diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python/Ecc/Check.py
index a8ec638fc..dbfedb514 100644
--- a/BaseTools/Source/Python/Ecc/Check.py
+++ b/BaseTools/Source/Python/Ecc/Check.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define checkpoints used by ECC tool
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
@@ -341,9 +341,19 @@ class Check(object):
for Dirpath, Dirnames, Filenames in self.WalkTree():
for F in Filenames:
- if os.path.splitext(F)[1] in ('.h', '.c'):
+ Ext = os.path.splitext(F)[1]
+ if Ext in ('.h', '.c'):
FullName = os.path.join(Dirpath, F)
MsgList = c.CheckFileHeaderDoxygenComments(FullName)
+ elif Ext in ('.inf', '.dec', '.dsc', '.fdf'):
+ FullName = os.path.join(Dirpath, F)
+ if not open(FullName).read().startswith('## @file'):
+ SqlStatement = """ select ID from File where FullPath like '%s'""" % FullName
+ ResultSet = EccGlobalData.gDb.TblFile.Exec(SqlStatement)
+ for Result in ResultSet:
+ Msg = 'INF/DEC/DSC/FDF file header comment should begin with ""## @file""'
+ EccGlobalData.gDb.TblReport.Insert(ERROR_DOXYGEN_CHECK_FILE_HEADER, Msg, "File", Result[0])
+
# Check whether the function headers are followed Doxygen special documentation blocks in section 2.3.5
def DoxygenCheckFunctionHeader(self):
@@ -399,6 +409,7 @@ class Check(object):
self.MetaDataFileCheckGuidDuplicate()
self.MetaDataFileCheckModuleFileNoUse()
self.MetaDataFileCheckPcdType()
+ self.MetaDataFileCheckModuleFileGuidDuplication()
# Check whether each file defined in meta-data exists
def MetaDataFileCheckPathName(self):
@@ -692,6 +703,38 @@ class Check(object):
#ERROR_META_DATA_FILE_CHECK_PCD_TYPE
pass
+ # Internal worker function to get the INF workspace relative path from FileID
+ def GetInfFilePathFromID(self, FileID):
+ Table = EccGlobalData.gDb.TblFile
+ SqlCommand = """select A.FullPath from %s as A where A.ID = %s""" % (Table.Table, FileID)
+ RecordSet = Table.Exec(SqlCommand)
+ Path = ""
+ for Record in RecordSet:
+ Path = Record[0].replace(EccGlobalData.gWorkspace, '')
+ if Path.startswith('\\') or Path.startswith('/'):
+ Path = Path[1:]
+ return Path
+
+ # Check whether two module INFs under one workspace has the same FILE_GUID value
+ def MetaDataFileCheckModuleFileGuidDuplication(self):
+ if EccGlobalData.gConfig.MetaDataFileCheckModuleFileGuidDuplication == '1' or EccGlobalData.gConfig.MetaDataFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
+ EdkLogger.quiet("Checking for pcd type in c code function usage ...")
+ Table = EccGlobalData.gDb.TblInf
+ SqlCommand = """
+ select A.ID, A.Value2, A.BelongsToFile, B.BelongsToFile from %s as A, %s as B
+ where A.Value1 = 'FILE_GUID' and B.Value1 = 'FILE_GUID' and
+ A.Value2 = B.Value2 and A.ID <> B.ID group by A.ID
+ """ % (Table.Table, Table.Table)
+ RecordSet = Table.Exec(SqlCommand)
+ for Record in RecordSet:
+ InfPath1 = self.GetInfFilePathFromID(Record[2])
+ InfPath2 = self.GetInfFilePathFromID(Record[3])
+ if InfPath1 and InfPath2:
+ if not EccGlobalData.gException.IsException(ERROR_META_DATA_FILE_CHECK_MODULE_FILE_GUID_DUPLICATION, InfPath1):
+ Msg = "The FILE_GUID of INF file [%s] is duplicated with that of %s" % (InfPath1, InfPath2)
+ EccGlobalData.gDb.TblReport.Insert(ERROR_META_DATA_FILE_CHECK_MODULE_FILE_GUID_DUPLICATION, OtherMsg = Msg, BelongsToTable = Table.Table, BelongsToItem = Record[0])
+
+
# Check whether these is duplicate Guid/Ppi/Protocol name
def CheckGuidProtocolPpi(self, ErrorID, Model, Table):
Name = ''
diff --git a/BaseTools/Source/Python/Ecc/CodeFragment.py b/BaseTools/Source/Python/Ecc/CodeFragment.py
index 1c5c5e4df..3bf1c4515 100644
--- a/BaseTools/Source/Python/Ecc/CodeFragment.py
+++ b/BaseTools/Source/Python/Ecc/CodeFragment.py
@@ -1,9 +1,9 @@
## @file
# fragments of source file
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py b/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
index d95faeef6..134b15f81 100644
--- a/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
+++ b/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
@@ -1,9 +1,9 @@
## @file
# preprocess source file
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Ecc/Configuration.py b/BaseTools/Source/Python/Ecc/Configuration.py
index bd9313cef..310cb5716 100644
--- a/BaseTools/Source/Python/Ecc/Configuration.py
+++ b/BaseTools/Source/Python/Ecc/Configuration.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define class Configuration
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
@@ -222,7 +222,9 @@ class Configuration(object):
self.MetaDataFileCheckModuleFileNoUse = 1
# Check whether the PCD is correctly used in C function via its type
self.MetaDataFileCheckPcdType = 1
-
+ # Check whether there are FILE_GUID duplication among different INF files
+ self.MetaDataFileCheckModuleFileGuidDuplication = 1
+
#
# The check points in this section are reserved
#
diff --git a/BaseTools/Source/Python/Ecc/Database.py b/BaseTools/Source/Python/Ecc/Database.py
index c9311f65a..9520be434 100644
--- a/BaseTools/Source/Python/Ecc/Database.py
+++ b/BaseTools/Source/Python/Ecc/Database.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create a database used by ECC tool
#
-# Copyright (c) 2007 ~ 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Ecc/Ecc.py b/BaseTools/Source/Python/Ecc/Ecc.py
index 4b5c319c3..62b265bba 100644
--- a/BaseTools/Source/Python/Ecc/Ecc.py
+++ b/BaseTools/Source/Python/Ecc/Ecc.py
@@ -1,8 +1,8 @@
## @file
# This file is used to be the main entrance of ECC tool
#
-# Copyright (c) 2009 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Ecc/EccGlobalData.py b/BaseTools/Source/Python/Ecc/EccGlobalData.py
index 8e8f24b8c..29e4aca0d 100644
--- a/BaseTools/Source/Python/Ecc/EccGlobalData.py
+++ b/BaseTools/Source/Python/Ecc/EccGlobalData.py
@@ -1,8 +1,8 @@
## @file
# This file is used to save global datas used by ECC tool
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Ecc/EccToolError.py b/BaseTools/Source/Python/Ecc/EccToolError.py
index f6c4097e7..985737f19 100644
--- a/BaseTools/Source/Python/Ecc/EccToolError.py
+++ b/BaseTools/Source/Python/Ecc/EccToolError.py
@@ -1,8 +1,8 @@
## @file
# Standardized Error Hanlding infrastructures.
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
@@ -92,6 +92,7 @@ ERROR_META_DATA_FILE_CHECK_DUPLICATE_PROTOCOL = 10012
ERROR_META_DATA_FILE_CHECK_DUPLICATE_PPI = 10013
ERROR_META_DATA_FILE_CHECK_MODULE_FILE_NO_USE = 10014
ERROR_META_DATA_FILE_CHECK_PCD_TYPE = 10015
+ERROR_META_DATA_FILE_CHECK_MODULE_FILE_GUID_DUPLICATION = 10016
ERROR_SPELLING_CHECK_ALL = 11000
@@ -177,7 +178,7 @@ gEccErrorMessage = {
ERROR_META_DATA_FILE_CHECK_DUPLICATE_PPI : "Duplicate PPI found",
ERROR_META_DATA_FILE_CHECK_MODULE_FILE_NO_USE : "No used module files found",
ERROR_META_DATA_FILE_CHECK_PCD_TYPE : "Wrong C code function used for this kind of PCD",
-
+ ERROR_META_DATA_FILE_CHECK_MODULE_FILE_GUID_DUPLICATION : "Module file has FILE_GUID collision with other module file",
ERROR_SPELLING_CHECK_ALL : "",
}
diff --git a/BaseTools/Source/Python/Ecc/Exception.py b/BaseTools/Source/Python/Ecc/Exception.py
index 733408551..ff8736059 100644
--- a/BaseTools/Source/Python/Ecc/Exception.py
+++ b/BaseTools/Source/Python/Ecc/Exception.py
@@ -1,8 +1,8 @@
## @file
# This file is used to parse exception items found by ECC tool
#
-# Copyright (c) 2009, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Ecc/FileProfile.py b/BaseTools/Source/Python/Ecc/FileProfile.py
index 810087ea0..689aee097 100644
--- a/BaseTools/Source/Python/Ecc/FileProfile.py
+++ b/BaseTools/Source/Python/Ecc/FileProfile.py
@@ -1,9 +1,9 @@
## @file
# fragments of source file
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Ecc/MetaDataParser.py b/BaseTools/Source/Python/Ecc/MetaDataParser.py
index fb4239f47..36ad6e492 100644
--- a/BaseTools/Source/Python/Ecc/MetaDataParser.py
+++ b/BaseTools/Source/Python/Ecc/MetaDataParser.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define common parser functions for meta-data
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Ecc/ParserWarning.py b/BaseTools/Source/Python/Ecc/ParserWarning.py
index 187473991..a52c78ec3 100644
--- a/BaseTools/Source/Python/Ecc/ParserWarning.py
+++ b/BaseTools/Source/Python/Ecc/ParserWarning.py
@@ -1,8 +1,8 @@
## @file
# This file is used to be the warning class of ECC tool
#
-# Copyright (c) 2009 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Ecc/__init__.py b/BaseTools/Source/Python/Ecc/__init__.py
index f385b1e67..880ad499f 100644
--- a/BaseTools/Source/Python/Ecc/__init__.py
+++ b/BaseTools/Source/Python/Ecc/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py
index 1085da942..941392be0 100644
--- a/BaseTools/Source/Python/Ecc/c.py
+++ b/BaseTools/Source/Python/Ecc/c.py
@@ -1,8 +1,8 @@
## @file
# This file is used to be the c coding style checking of ECC tool
#
-# Copyright (c) 2009 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Ecc/config.ini b/BaseTools/Source/Python/Ecc/config.ini
index a3215aeda..973bc68b3 100644
--- a/BaseTools/Source/Python/Ecc/config.ini
+++ b/BaseTools/Source/Python/Ecc/config.ini
@@ -2,8 +2,8 @@
# This file is used to set configuration of ECC tool
# For the items listed below, 1 means valid, 0 means invalid
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
@@ -233,6 +233,8 @@ MetaDataFileCheckGuidDuplicate = 1
MetaDataFileCheckModuleFileNoUse = 1
# Check whether the PCD is correctly used in C function via its type
MetaDataFileCheckPcdType = 1
+# Check whether there are FILE_GUID duplication among different INF files
+MetaDataFileCheckModuleFileGuidDuplication = 1
#
# The check points in this section are reserved
diff --git a/BaseTools/Source/Python/Ecc/exception.xml b/BaseTools/Source/Python/Ecc/exception.xml
index 58cb600e4..9102de6fe 100644
--- a/BaseTools/Source/Python/Ecc/exception.xml
+++ b/BaseTools/Source/Python/Ecc/exception.xml
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ExceptionList xmlns="http://www.uefi.org/2008/2.1" xmlns:xsi="http:/www.w3.org/2001/XMLSchema-instance">
- <Copyright>Copyright (c) 2009 - 2010, Intel Corporation.</Copyright>
+ <Copyright>Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.</Copyright>
<License>
- All rights reserved.
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this distribution.
The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Eot/CLexer.py b/BaseTools/Source/Python/Eot/CLexer.py
index 947ac4c8e..a72d4ee3c 100644
--- a/BaseTools/Source/Python/Eot/CLexer.py
+++ b/BaseTools/Source/Python/Eot/CLexer.py
@@ -10,7 +10,7 @@ from antlr3.compat import set, frozenset
# This file is generated by running:
# java org.antlr.Tool C.g
#
-# Copyright (c) 2009 - 2010, Intel Corporation All rights reserved.
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this
diff --git a/BaseTools/Source/Python/Eot/CParser.py b/BaseTools/Source/Python/Eot/CParser.py
index e56a79a43..511d429f2 100644
--- a/BaseTools/Source/Python/Eot/CParser.py
+++ b/BaseTools/Source/Python/Eot/CParser.py
@@ -10,7 +10,7 @@ from antlr3.compat import set, frozenset
# This file is generated by running:
# java org.antlr.Tool C.g
#
-# Copyright (c) 2009 - 2010, Intel Corporation All rights reserved.
+# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this
diff --git a/BaseTools/Source/Python/Eot/CodeFragment.py b/BaseTools/Source/Python/Eot/CodeFragment.py
index 6dc30a3ba..db5f40a6a 100644
--- a/BaseTools/Source/Python/Eot/CodeFragment.py
+++ b/BaseTools/Source/Python/Eot/CodeFragment.py
@@ -1,9 +1,9 @@
## @file
# fragments of source file
#
-# Copyright (c) 2007 ~ 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Eot/CodeFragmentCollector.py b/BaseTools/Source/Python/Eot/CodeFragmentCollector.py
index 349f93430..4e8cef2c4 100644
--- a/BaseTools/Source/Python/Eot/CodeFragmentCollector.py
+++ b/BaseTools/Source/Python/Eot/CodeFragmentCollector.py
@@ -1,9 +1,9 @@
## @file
# preprocess source file
#
-# Copyright (c) 2007 ~ 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Eot/Database.py b/BaseTools/Source/Python/Eot/Database.py
index e3fb4f2dd..ce38a0fa9 100644
--- a/BaseTools/Source/Python/Eot/Database.py
+++ b/BaseTools/Source/Python/Eot/Database.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create a database used by EOT tool
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Eot/Eot.py b/BaseTools/Source/Python/Eot/Eot.py
index 815907dfd..ee7f3197a 100644
--- a/BaseTools/Source/Python/Eot/Eot.py
+++ b/BaseTools/Source/Python/Eot/Eot.py
@@ -1,8 +1,8 @@
## @file
# This file is used to be the main entrance of EOT tool
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Eot/EotGlobalData.py b/BaseTools/Source/Python/Eot/EotGlobalData.py
index a70a60b81..43fd57a8d 100644
--- a/BaseTools/Source/Python/Eot/EotGlobalData.py
+++ b/BaseTools/Source/Python/Eot/EotGlobalData.py
@@ -1,8 +1,8 @@
## @file
# This file is used to save global datas
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Eot/EotToolError.py b/BaseTools/Source/Python/Eot/EotToolError.py
index 17005f30f..0b3686a58 100644
--- a/BaseTools/Source/Python/Eot/EotToolError.py
+++ b/BaseTools/Source/Python/Eot/EotToolError.py
@@ -1,8 +1,8 @@
## @file
# Standardized Error Handling infrastructures.
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Eot/FileProfile.py b/BaseTools/Source/Python/Eot/FileProfile.py
index 602639e5b..b377ef6f4 100644
--- a/BaseTools/Source/Python/Eot/FileProfile.py
+++ b/BaseTools/Source/Python/Eot/FileProfile.py
@@ -1,9 +1,9 @@
## @file
# fragments of source file
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Eot/FvImage.py b/BaseTools/Source/Python/Eot/FvImage.py
index ad88491ba..d54c2233d 100644
--- a/BaseTools/Source/Python/Eot/FvImage.py
+++ b/BaseTools/Source/Python/Eot/FvImage.py
@@ -1,8 +1,8 @@
## @file
# Parse FV image
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Eot/InfParserLite.py b/BaseTools/Source/Python/Eot/InfParserLite.py
index 06f775f80..6750f5a0c 100644
--- a/BaseTools/Source/Python/Eot/InfParserLite.py
+++ b/BaseTools/Source/Python/Eot/InfParserLite.py
@@ -1,8 +1,8 @@
## @file
# This file is used to parse INF file of EDK project
#
-# Copyright (c) 2008 - 2010 Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Eot/Parser.py b/BaseTools/Source/Python/Eot/Parser.py
index 6850c8d32..9ef71a958 100644
--- a/BaseTools/Source/Python/Eot/Parser.py
+++ b/BaseTools/Source/Python/Eot/Parser.py
@@ -2,8 +2,8 @@
# This file is used to define common parsing related functions used in parsing
# Inf/Dsc/Makefile process
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
@@ -453,8 +453,7 @@ def SearchPpiCallFunction(Identifier, SourceFileID, SourceFileFullPath, ItemMode
if NewRecordSet:
NewRecord = NewRecordSet[0][0]
VariableValueList = NewRecord.split('},')
- if len(VariableValueList) > Index:
- VariableValue = VariableValueList[Index]
+ for VariableValue in VariableValueList[Index:]:
NewVariableValueList = VariableValue.split(',')
if len(NewVariableValueList) > 1:
NewVariableValue = NewVariableValueList[1].strip()
diff --git a/BaseTools/Source/Python/Eot/ParserWarning.py b/BaseTools/Source/Python/Eot/ParserWarning.py
index af8333af2..2e3f5e498 100644
--- a/BaseTools/Source/Python/Eot/ParserWarning.py
+++ b/BaseTools/Source/Python/Eot/ParserWarning.py
@@ -1,9 +1,9 @@
## @file
# Warning information of Eot
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Eot/Report.py b/BaseTools/Source/Python/Eot/Report.py
index 34002ba7d..024f6d87b 100644
--- a/BaseTools/Source/Python/Eot/Report.py
+++ b/BaseTools/Source/Python/Eot/Report.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create report for Eot tool
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Eot/__init__.py b/BaseTools/Source/Python/Eot/__init__.py
index ecd6a071f..c184a687d 100644
--- a/BaseTools/Source/Python/Eot/__init__.py
+++ b/BaseTools/Source/Python/Eot/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Eot/c.py b/BaseTools/Source/Python/Eot/c.py
index 8b11ed378..f191dd4ef 100644
--- a/BaseTools/Source/Python/Eot/c.py
+++ b/BaseTools/Source/Python/Eot/c.py
@@ -1,9 +1,9 @@
## @file
# preprocess source file
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
@@ -353,9 +353,12 @@ def GetFunctionList():
def CreateCCodeDB(FileNameList):
FileObjList = []
ParseErrorFileList = []
-
+ ParsedFiles = {}
for FullName in FileNameList:
if os.path.splitext(FullName)[1] in ('.h', '.c'):
+ if FullName.lower() in ParsedFiles:
+ continue
+ ParsedFiles[FullName.lower()] = 1
EdkLogger.info("Parsing " + FullName)
model = FullName.endswith('c') and DataClass.MODEL_FILE_C or DataClass.MODEL_FILE_H
collector = CodeFragmentCollector.CodeFragmentCollector(FullName)
diff --git a/BaseTools/Source/Python/Fdb/__init__.py b/BaseTools/Source/Python/Fdb/__init__.py
index 8d79301f3..c9dbe8e4f 100644
--- a/BaseTools/Source/Python/Fdb/__init__.py
+++ b/BaseTools/Source/Python/Fdb/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/FixFlash/__init__.py b/BaseTools/Source/Python/FixFlash/__init__.py
index df2630319..b648fcaf0 100644
--- a/BaseTools/Source/Python/FixFlash/__init__.py
+++ b/BaseTools/Source/Python/FixFlash/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GNUmakefile b/BaseTools/Source/Python/GNUmakefile
index 2f357a63d..e489c1075 100644
--- a/BaseTools/Source/Python/GNUmakefile
+++ b/BaseTools/Source/Python/GNUmakefile
@@ -1,8 +1,8 @@
## @file
# Windows makefile for Python tools build.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/AprioriSection.py b/BaseTools/Source/Python/GenFds/AprioriSection.py
index 92a9794f5..bb40d756c 100644
--- a/BaseTools/Source/Python/GenFds/AprioriSection.py
+++ b/BaseTools/Source/Python/GenFds/AprioriSection.py
@@ -1,9 +1,9 @@
## @file
# process APRIORI file data and generate PEI/DXE APRIORI file
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/Attribute.py b/BaseTools/Source/Python/GenFds/Attribute.py
index 67f9956e1..17761f2e2 100644
--- a/BaseTools/Source/Python/GenFds/Attribute.py
+++ b/BaseTools/Source/Python/GenFds/Attribute.py
@@ -1,9 +1,9 @@
## @file
# name value pair
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/Capsule.py b/BaseTools/Source/Python/GenFds/Capsule.py
index 961b88a45..fb9213b46 100644
--- a/BaseTools/Source/Python/GenFds/Capsule.py
+++ b/BaseTools/Source/Python/GenFds/Capsule.py
@@ -1,9 +1,9 @@
## @file
# generate capsule
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/CapsuleData.py b/BaseTools/Source/Python/GenFds/CapsuleData.py
index 0940094de..85307b90c 100644
--- a/BaseTools/Source/Python/GenFds/CapsuleData.py
+++ b/BaseTools/Source/Python/GenFds/CapsuleData.py
@@ -1,9 +1,9 @@
## @file
# generate capsule
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/ComponentStatement.py b/BaseTools/Source/Python/GenFds/ComponentStatement.py
index 8a7540fe2..1cf926155 100644
--- a/BaseTools/Source/Python/GenFds/ComponentStatement.py
+++ b/BaseTools/Source/Python/GenFds/ComponentStatement.py
@@ -1,9 +1,9 @@
## @file
# VTF components
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/CompressSection.py b/BaseTools/Source/Python/GenFds/CompressSection.py
index 7e126678a..4bcf286c2 100644
--- a/BaseTools/Source/Python/GenFds/CompressSection.py
+++ b/BaseTools/Source/Python/GenFds/CompressSection.py
@@ -1,9 +1,9 @@
## @file
# process compress section generation
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/DataSection.py b/BaseTools/Source/Python/GenFds/DataSection.py
index 7f24b51fc..dff469146 100644
--- a/BaseTools/Source/Python/GenFds/DataSection.py
+++ b/BaseTools/Source/Python/GenFds/DataSection.py
@@ -1,9 +1,9 @@
## @file
# process data section generation
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/DepexSection.py b/BaseTools/Source/Python/GenFds/DepexSection.py
index 8650a73eb..39678b23e 100644
--- a/BaseTools/Source/Python/GenFds/DepexSection.py
+++ b/BaseTools/Source/Python/GenFds/DepexSection.py
@@ -1,9 +1,9 @@
## @file
# process depex section generation
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py
index ad953facb..5419e11fc 100644
--- a/BaseTools/Source/Python/GenFds/EfiSection.py
+++ b/BaseTools/Source/Python/GenFds/EfiSection.py
@@ -1,9 +1,9 @@
## @file
# process rule section generation
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/Fd.py b/BaseTools/Source/Python/GenFds/Fd.py
index 26de500d9..cbfd6715c 100644
--- a/BaseTools/Source/Python/GenFds/Fd.py
+++ b/BaseTools/Source/Python/GenFds/Fd.py
@@ -1,9 +1,9 @@
## @file
# process FD generation
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 1e87eb410..ea19156da 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -1,9 +1,9 @@
## @file
# parse FDF file
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/Ffs.py b/BaseTools/Source/Python/GenFds/Ffs.py
index 438bd186d..d9f1cdaff 100644
--- a/BaseTools/Source/Python/GenFds/Ffs.py
+++ b/BaseTools/Source/Python/GenFds/Ffs.py
@@ -1,9 +1,9 @@
## @file
# process FFS generation
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/FfsFileStatement.py b/BaseTools/Source/Python/GenFds/FfsFileStatement.py
index b0b1b00c7..013dbb1f0 100644
--- a/BaseTools/Source/Python/GenFds/FfsFileStatement.py
+++ b/BaseTools/Source/Python/GenFds/FfsFileStatement.py
@@ -1,9 +1,9 @@
## @file
# process FFS generation from FILE statement
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
index b00e5a217..d95af34df 100644
--- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py
+++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
@@ -1,9 +1,9 @@
## @file
# process FFS generation from INF statement
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/Fv.py b/BaseTools/Source/Python/GenFds/Fv.py
index 8d2ef1d87..7b6305b48 100644
--- a/BaseTools/Source/Python/GenFds/Fv.py
+++ b/BaseTools/Source/Python/GenFds/Fv.py
@@ -1,9 +1,9 @@
## @file
# process FV generation
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/FvImageSection.py b/BaseTools/Source/Python/GenFds/FvImageSection.py
index c945ce9b9..f5d3f4f9a 100644
--- a/BaseTools/Source/Python/GenFds/FvImageSection.py
+++ b/BaseTools/Source/Python/GenFds/FvImageSection.py
@@ -1,9 +1,9 @@
## @file
# process FV image section generation
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py
index 5e9a02299..cb82c717d 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -1,9 +1,9 @@
## @file
# generate flash image
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
@@ -35,6 +35,7 @@ import Common.GlobalData as GlobalData
from Common import EdkLogger
from Common.String import *
from Common.Misc import DirCache,PathClass
+from Common.Misc import SaveFileOnChange
## Version and Copyright
versionNumber = "1.0"
@@ -486,14 +487,15 @@ class GenFds :
def GenerateGuidXRefFile(BuildDb, ArchList):
GuidXRefFileName = os.path.join(GenFdsGlobalVariable.FvDir, "Guid.xref")
- GuidXRefFile = open(GuidXRefFileName, "w+")
+ GuidXRefFile = StringIO.StringIO('')
for Arch in ArchList:
PlatformDataBase = BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch]
for ModuleFile in PlatformDataBase.Modules:
Module = BuildDb.BuildObject[ModuleFile, Arch]
GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.BaseName))
+ SaveFileOnChange(GuidXRefFileName, GuidXRefFile.getvalue(), False)
GuidXRefFile.close()
- GenFdsGlobalVariable.InfLogger("\nGUID cross reference file saved to %s" % GuidXRefFileName)
+ GenFdsGlobalVariable.InfLogger("\nGUID cross reference file can be found at %s" % GuidXRefFileName)
##Define GenFd as static function
GenFd = staticmethod(GenFd)
diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
index cad275862..e9eace9c3 100644
--- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
+++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
@@ -1,9 +1,9 @@
## @file
# Global variables for GenFds
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/GuidSection.py b/BaseTools/Source/Python/GenFds/GuidSection.py
index d96788047..0ef5a2371 100644
--- a/BaseTools/Source/Python/GenFds/GuidSection.py
+++ b/BaseTools/Source/Python/GenFds/GuidSection.py
@@ -1,9 +1,9 @@
## @file
# process GUIDed section generation
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/OptRomFileStatement.py b/BaseTools/Source/Python/GenFds/OptRomFileStatement.py
index c360c6d9a..a98d208e1 100644
--- a/BaseTools/Source/Python/GenFds/OptRomFileStatement.py
+++ b/BaseTools/Source/Python/GenFds/OptRomFileStatement.py
@@ -1,9 +1,9 @@
## @file
# process OptionROM generation from FILE statement
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/OptRomInfStatement.py b/BaseTools/Source/Python/GenFds/OptRomInfStatement.py
index 8cd7429d5..d64f83616 100644
--- a/BaseTools/Source/Python/GenFds/OptRomInfStatement.py
+++ b/BaseTools/Source/Python/GenFds/OptRomInfStatement.py
@@ -1,9 +1,9 @@
## @file
# process OptionROM generation from INF statement
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/OptionRom.py b/BaseTools/Source/Python/GenFds/OptionRom.py
index 28e77aad5..ce46413bf 100644
--- a/BaseTools/Source/Python/GenFds/OptionRom.py
+++ b/BaseTools/Source/Python/GenFds/OptionRom.py
@@ -1,9 +1,9 @@
## @file
# process OptionROM generation
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/Region.py b/BaseTools/Source/Python/GenFds/Region.py
index 99f1ac39a..09971b3cd 100644
--- a/BaseTools/Source/Python/GenFds/Region.py
+++ b/BaseTools/Source/Python/GenFds/Region.py
@@ -1,9 +1,9 @@
## @file
# process FD Region generation
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/Rule.py b/BaseTools/Source/Python/GenFds/Rule.py
index 40a5f88ba..0e112cf15 100644
--- a/BaseTools/Source/Python/GenFds/Rule.py
+++ b/BaseTools/Source/Python/GenFds/Rule.py
@@ -1,9 +1,9 @@
## @file
# Rule object for generating FFS
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/RuleComplexFile.py b/BaseTools/Source/Python/GenFds/RuleComplexFile.py
index 63e65c597..36c483fbb 100644
--- a/BaseTools/Source/Python/GenFds/RuleComplexFile.py
+++ b/BaseTools/Source/Python/GenFds/RuleComplexFile.py
@@ -1,9 +1,9 @@
## @file
# Complex Rule object for generating FFS
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/RuleSimpleFile.py b/BaseTools/Source/Python/GenFds/RuleSimpleFile.py
index c6fdbd88d..061f984e6 100644
--- a/BaseTools/Source/Python/GenFds/RuleSimpleFile.py
+++ b/BaseTools/Source/Python/GenFds/RuleSimpleFile.py
@@ -1,9 +1,9 @@
## @file
# Simple Rule object for generating FFS
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py
index 2e24697a3..8c884b6e1 100644
--- a/BaseTools/Source/Python/GenFds/Section.py
+++ b/BaseTools/Source/Python/GenFds/Section.py
@@ -1,9 +1,9 @@
## @file
# section base class
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/UiSection.py b/BaseTools/Source/Python/GenFds/UiSection.py
index e660055f9..e1b69ed13 100644
--- a/BaseTools/Source/Python/GenFds/UiSection.py
+++ b/BaseTools/Source/Python/GenFds/UiSection.py
@@ -1,9 +1,9 @@
## @file
# process UI section generation
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/VerSection.py b/BaseTools/Source/Python/GenFds/VerSection.py
index e27d0a20f..3fca4064f 100644
--- a/BaseTools/Source/Python/GenFds/VerSection.py
+++ b/BaseTools/Source/Python/GenFds/VerSection.py
@@ -1,9 +1,9 @@
## @file
# process Version section generation
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/Vtf.py b/BaseTools/Source/Python/GenFds/Vtf.py
index eebc7b1da..2bea9346c 100644
--- a/BaseTools/Source/Python/GenFds/Vtf.py
+++ b/BaseTools/Source/Python/GenFds/Vtf.py
@@ -1,9 +1,9 @@
## @file
# process VTF generation
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenFds/__init__.py b/BaseTools/Source/Python/GenFds/__init__.py
index 1c5796aff..6ba4ed443 100644
--- a/BaseTools/Source/Python/GenFds/__init__.py
+++ b/BaseTools/Source/Python/GenFds/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py b/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
index 38398221d..74ad01166 100644
--- a/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
+++ b/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
@@ -5,8 +5,8 @@
# PCD Name Offset in binary
# ======== ================
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/GenPatchPcdTable/__init__.py b/BaseTools/Source/Python/GenPatchPcdTable/__init__.py
index d6a199f7d..58a5b1d63 100644
--- a/BaseTools/Source/Python/GenPatchPcdTable/__init__.py
+++ b/BaseTools/Source/Python/GenPatchPcdTable/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Makefile b/BaseTools/Source/Python/Makefile
index 0b103f2b1..26aacf947 100644
--- a/BaseTools/Source/Python/Makefile
+++ b/BaseTools/Source/Python/Makefile
@@ -1,8 +1,8 @@
## @file
# Windows makefile for Python tools build.
#
-# Copyright (c) 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/MigrationMsa2Inf/AutoGenExterns.py b/BaseTools/Source/Python/MigrationMsa2Inf/AutoGenExterns.py
index 16f7a6bb2..37fff885a 100644
--- a/BaseTools/Source/Python/MigrationMsa2Inf/AutoGenExterns.py
+++ b/BaseTools/Source/Python/MigrationMsa2Inf/AutoGenExterns.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python
#
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py b/BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py
index 09245344a..2c81c995b 100644
--- a/BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py
+++ b/BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python
#
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/MigrationMsa2Inf/__init__.py b/BaseTools/Source/Python/MigrationMsa2Inf/__init__.py
index 6eb8a1e57..4c44c2473 100644
--- a/BaseTools/Source/Python/MigrationMsa2Inf/__init__.py
+++ b/BaseTools/Source/Python/MigrationMsa2Inf/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/MkBOM/__init__.py b/BaseTools/Source/Python/MkBOM/__init__.py
index 6b2e9b285..86ef62958 100644
--- a/BaseTools/Source/Python/MkBOM/__init__.py
+++ b/BaseTools/Source/Python/MkBOM/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/PackagingTool/DependencyRules.py b/BaseTools/Source/Python/PackagingTool/DependencyRules.py
index 402694054..7956c8a2a 100644
--- a/BaseTools/Source/Python/PackagingTool/DependencyRules.py
+++ b/BaseTools/Source/Python/PackagingTool/DependencyRules.py
@@ -1,8 +1,8 @@
## @file
# This file is for installed package information database operations
#
-# Copyright (c) 2007 ~ 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/PackagingTool/InstallPkg.py b/BaseTools/Source/Python/PackagingTool/InstallPkg.py
index ebf907784..8e4d45da2 100644
--- a/BaseTools/Source/Python/PackagingTool/InstallPkg.py
+++ b/BaseTools/Source/Python/PackagingTool/InstallPkg.py
@@ -1,8 +1,8 @@
## @file
# Install distribution package.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/PackagingTool/IpiDb.py b/BaseTools/Source/Python/PackagingTool/IpiDb.py
index 8661edbca..6da3e1897 100644
--- a/BaseTools/Source/Python/PackagingTool/IpiDb.py
+++ b/BaseTools/Source/Python/PackagingTool/IpiDb.py
@@ -1,8 +1,8 @@
## @file
# This file is for installed package information database operations
#
-# Copyright (c) 2007 ~ 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/PackagingTool/MkPkg.py b/BaseTools/Source/Python/PackagingTool/MkPkg.py
index ec2136811..f6d693d2d 100644
--- a/BaseTools/Source/Python/PackagingTool/MkPkg.py
+++ b/BaseTools/Source/Python/PackagingTool/MkPkg.py
@@ -1,8 +1,8 @@
## @file
# Install distribution package.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/PackagingTool/PackageFile.py b/BaseTools/Source/Python/PackagingTool/PackageFile.py
index 12544927c..619423144 100644
--- a/BaseTools/Source/Python/PackagingTool/PackageFile.py
+++ b/BaseTools/Source/Python/PackagingTool/PackageFile.py
@@ -2,8 +2,8 @@
#
# PackageFile class represents the zip file of a distribution package.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/PackagingTool/RmPkg.py b/BaseTools/Source/Python/PackagingTool/RmPkg.py
index ffe34bd92..38908a331 100644
--- a/BaseTools/Source/Python/PackagingTool/RmPkg.py
+++ b/BaseTools/Source/Python/PackagingTool/RmPkg.py
@@ -1,8 +1,8 @@
## @file
# Install distribution package.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py b/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py
index 9a9f1d046..7212522cb 100644
--- a/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py
+++ b/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py
@@ -1,8 +1,8 @@
## @file
# Patch value into the binary file.
#
-# Copyright (c) 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/PatchPcdValue/__init__.py b/BaseTools/Source/Python/PatchPcdValue/__init__.py
index 7ec3e7e67..a17d05f6b 100644
--- a/BaseTools/Source/Python/PatchPcdValue/__init__.py
+++ b/BaseTools/Source/Python/PatchPcdValue/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Table/Table.py b/BaseTools/Source/Python/Table/Table.py
index 9a9657a4b..c311df91c 100644
--- a/BaseTools/Source/Python/Table/Table.py
+++ b/BaseTools/Source/Python/Table/Table.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase a common table
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Table/TableDataModel.py b/BaseTools/Source/Python/Table/TableDataModel.py
index 1e5fe47af..9c3d7bd93 100644
--- a/BaseTools/Source/Python/Table/TableDataModel.py
+++ b/BaseTools/Source/Python/Table/TableDataModel.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase table for data models
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Table/TableDec.py b/BaseTools/Source/Python/Table/TableDec.py
index f570fd1d1..6b7d22c93 100644
--- a/BaseTools/Source/Python/Table/TableDec.py
+++ b/BaseTools/Source/Python/Table/TableDec.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase table for dec datas
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Table/TableDsc.py b/BaseTools/Source/Python/Table/TableDsc.py
index 62608a061..69477d544 100644
--- a/BaseTools/Source/Python/Table/TableDsc.py
+++ b/BaseTools/Source/Python/Table/TableDsc.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase table for dsc datas
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Table/TableEotReport.py b/BaseTools/Source/Python/Table/TableEotReport.py
index 2d98129e4..dd465b68b 100644
--- a/BaseTools/Source/Python/Table/TableEotReport.py
+++ b/BaseTools/Source/Python/Table/TableEotReport.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase table for ECC reports
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Table/TableFdf.py b/BaseTools/Source/Python/Table/TableFdf.py
index 317bd4149..5fb8cd823 100644
--- a/BaseTools/Source/Python/Table/TableFdf.py
+++ b/BaseTools/Source/Python/Table/TableFdf.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase table for fdf datas
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Table/TableFile.py b/BaseTools/Source/Python/Table/TableFile.py
index 9be64942e..86dddd0f2 100644
--- a/BaseTools/Source/Python/Table/TableFile.py
+++ b/BaseTools/Source/Python/Table/TableFile.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase table for files
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Table/TableFunction.py b/BaseTools/Source/Python/Table/TableFunction.py
index c013d0d2f..3d7c2d0ea 100644
--- a/BaseTools/Source/Python/Table/TableFunction.py
+++ b/BaseTools/Source/Python/Table/TableFunction.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase table for functions
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Table/TableIdentifier.py b/BaseTools/Source/Python/Table/TableIdentifier.py
index 3cf33f20e..bcd6d6e1c 100644
--- a/BaseTools/Source/Python/Table/TableIdentifier.py
+++ b/BaseTools/Source/Python/Table/TableIdentifier.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase table for Identifiers
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Table/TableInf.py b/BaseTools/Source/Python/Table/TableInf.py
index 65ca1ce25..b6e300b15 100644
--- a/BaseTools/Source/Python/Table/TableInf.py
+++ b/BaseTools/Source/Python/Table/TableInf.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase table for inf datas
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Table/TablePcd.py b/BaseTools/Source/Python/Table/TablePcd.py
index ba91d175f..19623f98f 100644
--- a/BaseTools/Source/Python/Table/TablePcd.py
+++ b/BaseTools/Source/Python/Table/TablePcd.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase table for pcds
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Table/TableQuery.py b/BaseTools/Source/Python/Table/TableQuery.py
index 4ad9dc5e5..e1d253739 100644
--- a/BaseTools/Source/Python/Table/TableQuery.py
+++ b/BaseTools/Source/Python/Table/TableQuery.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase table for Queries
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Table/TableReport.py b/BaseTools/Source/Python/Table/TableReport.py
index 777a47915..2e7fd539f 100644
--- a/BaseTools/Source/Python/Table/TableReport.py
+++ b/BaseTools/Source/Python/Table/TableReport.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase table for ECC reports
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
@@ -105,7 +105,7 @@ class TableReport(Table):
IsCorrected = Record[5]
SqlCommand = ''
if BelongsToTable == 'File':
- SqlCommand = """select 0, FullPath from %s where ID = %s
+ SqlCommand = """select 1, FullPath from %s where ID = %s
""" % (BelongsToTable, BelongsToItem)
else:
SqlCommand = """select A.StartLine, B.FullPath from %s as A, File as B
diff --git a/BaseTools/Source/Python/Table/__init__.py b/BaseTools/Source/Python/Table/__init__.py
index ea0b26743..c6424a593 100644
--- a/BaseTools/Source/Python/Table/__init__.py
+++ b/BaseTools/Source/Python/Table/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2008 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/TargetTool/TargetTool.py b/BaseTools/Source/Python/TargetTool/TargetTool.py
index df3ed2f6b..68c55718b 100644
--- a/BaseTools/Source/Python/TargetTool/TargetTool.py
+++ b/BaseTools/Source/Python/TargetTool/TargetTool.py
@@ -1,7 +1,7 @@
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/TargetTool/__init__.py b/BaseTools/Source/Python/TargetTool/__init__.py
index cbc78a732..0187a7a74 100644
--- a/BaseTools/Source/Python/TargetTool/__init__.py
+++ b/BaseTools/Source/Python/TargetTool/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Trim/Trim.py b/BaseTools/Source/Python/Trim/Trim.py
index dbfa84a5d..d19bb09b2 100644
--- a/BaseTools/Source/Python/Trim/Trim.py
+++ b/BaseTools/Source/Python/Trim/Trim.py
@@ -1,8 +1,8 @@
## @file
# Trim files preprocessed by compiler
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
@@ -33,7 +33,7 @@ __copyright__ = "Copyright (c) 2007-2010, Intel Corporation. All rights reserved
## Regular expression for matching Line Control directive like "#line xxx"
gLineControlDirective = re.compile('^\s*#(?:line)?\s+([0-9]+)\s+"*([^"]*)"')
## Regular expression for matching "typedef struct"
-gTypedefPattern = re.compile("^\s*typedef\s+struct\s*[{]*$", re.MULTILINE)
+gTypedefPattern = re.compile("^\s*typedef\s+struct(\s+\w+)?\s*[{]*$", re.MULTILINE)
## Regular expression for matching "#pragma pack"
gPragmaPattern = re.compile("^\s*#pragma\s+pack", re.MULTILINE)
## Regular expression for matching HEX number
@@ -294,6 +294,7 @@ def DoInclude(Source, Indent=''):
CurrentIndent = Indent + Result[0][0]
IncludedFile = Result[0][1]
NewFileContent.extend(DoInclude(IncludedFile, CurrentIndent))
+ NewFileContent.append("\n")
gIncludedAslFile.pop()
F.close()
diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py b/BaseTools/Source/Python/Workspace/BuildClassObject.py
index 36c2ebf49..f0fef4dda 100644
--- a/BaseTools/Source/Python/Workspace/BuildClassObject.py
+++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py
@@ -1,8 +1,8 @@
## @file
# This file is used to define each component of the build database
#
-# Copyright (c) 2007 ~ 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Workspace/MetaDataTable.py b/BaseTools/Source/Python/Workspace/MetaDataTable.py
index c8166bfa9..64f0480c3 100644
--- a/BaseTools/Source/Python/Workspace/MetaDataTable.py
+++ b/BaseTools/Source/Python/Workspace/MetaDataTable.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase table for files
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index eb2e038b5..70c6e62fe 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -1,8 +1,8 @@
## @file
# This file is used to parse meta files
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Workspace/MetaFileTable.py b/BaseTools/Source/Python/Workspace/MetaFileTable.py
index 22e2afa4c..d8dacacd6 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileTable.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileTable.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create/update/query/erase a meta file table
#
-# Copyright (c) 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 5b20c4091..12c3324b8 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -1,8 +1,8 @@
## @file
# This file is used to create a database used by build tool
#
-# Copyright (c) 2008 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/Workspace/__init__.py b/BaseTools/Source/Python/Workspace/__init__.py
index 27a969bb2..05cd34bad 100644
--- a/BaseTools/Source/Python/Workspace/__init__.py
+++ b/BaseTools/Source/Python/Workspace/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2008 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index 329352204..af03e1f98 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -4,8 +4,8 @@
# This module contains the functionality to generate build report after
# build all target completes successfully.
#
-# Copyright (c) 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
@@ -22,12 +22,14 @@ import platform
import textwrap
import traceback
import sys
+import time
from datetime import datetime
+from StringIO import StringIO
from Common import EdkLogger
+from Common.Misc import SaveFileOnChange
from Common.Misc import GuidStructureByteArrayToGuidString
from Common.Misc import GuidStructureStringToGuidString
from Common.InfClassObject import gComponentType2ModuleType
-from Common.BuildToolError import FILE_OPEN_FAILURE
from Common.BuildToolError import FILE_WRITE_FAILURE
from Common.BuildToolError import CODE_ERROR
@@ -578,7 +580,8 @@ class PcdReport(object):
for Platform in Wa.BuildDatabase.WorkspaceDb.PlatformList:
for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:
DscDefaultValue = Platform.Pcds[(TokenCName, TokenSpaceGuidCName)].DefaultValue
- self.DscPcdDefault[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue
+ if DscDefaultValue:
+ self.DscPcdDefault[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue
##
# Generate report for PCD information
@@ -765,6 +768,13 @@ class PredictionReport(object):
for Pa in Wa.AutoGenObjectList:
for Module in Pa.LibraryAutoGenList + Pa.ModuleAutoGenList:
#
+ # BASE typed modules are EFI agnostic, so we need not scan
+ # their source code to find PPI/Protocol produce or consume
+ # information.
+ #
+ if Module.ModuleType == "BASE":
+ continue
+ #
# Add module referenced source files
#
self._SourceList.append(str(Module))
@@ -889,12 +899,17 @@ class PredictionReport(object):
try:
from Eot.Eot import Eot
+
#
- # Invoke EOT tool
+ # Invoke EOT tool and echo its runtime performance
#
+ EotStartTime = time.time()
Eot(CommandLineOption=False, SourceFileList=SourceList, GuidList=GuidList,
FvFileList=' '.join(FvFileList), Dispatch=DispatchList, IsInit=True)
-
+ EotEndTime = time.time()
+ EotDuration = time.strftime("%H:%M:%S", time.gmtime(int(round(EotEndTime - EotStartTime))))
+ EdkLogger.quiet("EOT run time: %s\n" % EotDuration)
+
#
# Parse the output of EOT tool
#
@@ -1415,13 +1430,11 @@ class BuildReport(object):
def GenerateReport(self, BuildDuration):
if self.ReportFile:
try:
- File = open(self.ReportFile, "w+")
- except IOError:
- EdkLogger.error(None, FILE_OPEN_FAILURE, ExtraData=self.ReportFile)
- try:
+ File = StringIO('')
for (Wa, MaList) in self.ReportList:
PlatformReport(Wa, MaList, self.ReportType).GenerateReport(File, BuildDuration, self.ReportType)
- EdkLogger.quiet("Report successfully saved to %s" % os.path.abspath(self.ReportFile))
+ SaveFileOnChange(self.ReportFile, File.getvalue(), False)
+ EdkLogger.quiet("Build report can be found at %s" % os.path.abspath(self.ReportFile))
except IOError:
EdkLogger.error(None, FILE_WRITE_FAILURE, ExtraData=self.ReportFile)
except:
diff --git a/BaseTools/Source/Python/build/__init__.py b/BaseTools/Source/Python/build/__init__.py
index 1c7f31a8b..64cf63b63 100644
--- a/BaseTools/Source/Python/build/__init__.py
+++ b/BaseTools/Source/Python/build/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index f608dee9b..545ffa39a 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1,9 +1,9 @@
## @file
# build a platform or a module
#
-# Copyright (c) 2007 - 2010, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
@@ -1289,12 +1289,10 @@ class Build():
#
# Save address map into MAP file.
#
- MapFile = open(MapFilePath, "wb")
- MapFile.write(MapBuffer.getvalue())
- MapFile.close()
- MapBuffer.close()
+ SaveFileOnChange(MapFilePath, MapBuffer.getvalue(), False)
+ MapBuffer.close()
if self.LoadFixAddress != 0:
- sys.stdout.write ("\nLoad Module At Fix Address Map file saved to %s\n" %(MapFilePath))
+ sys.stdout.write ("\nLoad Module At Fix Address Map file can be found at %s\n" %(MapFilePath))
sys.stdout.flush()
## Build active platform for different build targets and different tool chains
diff --git a/BaseTools/Source/Python/fpd2dsc/EdkIIWorkspaceGuidsInfo.py b/BaseTools/Source/Python/fpd2dsc/EdkIIWorkspaceGuidsInfo.py
index 528dbf3dd..68fa79e7a 100644
--- a/BaseTools/Source/Python/fpd2dsc/EdkIIWorkspaceGuidsInfo.py
+++ b/BaseTools/Source/Python/fpd2dsc/EdkIIWorkspaceGuidsInfo.py
@@ -1,8 +1,8 @@
## @file
# Collects the Guid Information in current workspace.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/fpd2dsc/LoadFpd.py b/BaseTools/Source/Python/fpd2dsc/LoadFpd.py
index cc97ec552..fe271ac85 100644
--- a/BaseTools/Source/Python/fpd2dsc/LoadFpd.py
+++ b/BaseTools/Source/Python/fpd2dsc/LoadFpd.py
@@ -1,8 +1,8 @@
## @file
# Open an FPD file and load all its contents to a PlatformClass object.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/fpd2dsc/MigrationUtilities.py b/BaseTools/Source/Python/fpd2dsc/MigrationUtilities.py
index d3c724832..8e360b9b5 100644
--- a/BaseTools/Source/Python/fpd2dsc/MigrationUtilities.py
+++ b/BaseTools/Source/Python/fpd2dsc/MigrationUtilities.py
@@ -1,8 +1,8 @@
## @file
# Contains several utilitities shared by migration tools.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/fpd2dsc/StoreDsc.py b/BaseTools/Source/Python/fpd2dsc/StoreDsc.py
index 8d07ab9c5..f8123a2f9 100644
--- a/BaseTools/Source/Python/fpd2dsc/StoreDsc.py
+++ b/BaseTools/Source/Python/fpd2dsc/StoreDsc.py
@@ -1,8 +1,8 @@
## @file
# Store a Platform class object to an INF file.
#
-# Copyright (c) 2007 - 2009, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/fpd2dsc/__init__.py b/BaseTools/Source/Python/fpd2dsc/__init__.py
index 4831e80db..f9d3a2197 100644
--- a/BaseTools/Source/Python/fpd2dsc/__init__.py
+++ b/BaseTools/Source/Python/fpd2dsc/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/fpd2dsc/fpd2dsc.py b/BaseTools/Source/Python/fpd2dsc/fpd2dsc.py
index 496e108b1..0d65e2bb5 100644
--- a/BaseTools/Source/Python/fpd2dsc/fpd2dsc.py
+++ b/BaseTools/Source/Python/fpd2dsc/fpd2dsc.py
@@ -1,8 +1,8 @@
## @file
# Convert an XML-based FPD file to a text-based DSC file.
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/msa2inf/ConvertModule.py b/BaseTools/Source/Python/msa2inf/ConvertModule.py
index af9aa1d8e..2a118ae51 100644
--- a/BaseTools/Source/Python/msa2inf/ConvertModule.py
+++ b/BaseTools/Source/Python/msa2inf/ConvertModule.py
@@ -2,8 +2,8 @@
# Convert an MSA Module class object ot an INF Module class object by filling
# several info required by INF file.
#
-# Copyright (c) 2007 - 2010, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/msa2inf/EdkIIWorkspaceGuidsInfo.py b/BaseTools/Source/Python/msa2inf/EdkIIWorkspaceGuidsInfo.py
index f1c8d60d7..6d6633b89 100644
--- a/BaseTools/Source/Python/msa2inf/EdkIIWorkspaceGuidsInfo.py
+++ b/BaseTools/Source/Python/msa2inf/EdkIIWorkspaceGuidsInfo.py
@@ -1,8 +1,8 @@
## @file
# Collects the Guid Information in current workspace.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/msa2inf/LoadMsa.py b/BaseTools/Source/Python/msa2inf/LoadMsa.py
index 4995f2cd0..5bf80300a 100644
--- a/BaseTools/Source/Python/msa2inf/LoadMsa.py
+++ b/BaseTools/Source/Python/msa2inf/LoadMsa.py
@@ -1,8 +1,8 @@
## @file
# Open an MSA file and load all its contents to a ModuleClass object.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/msa2inf/Msa2Inf.py b/BaseTools/Source/Python/msa2inf/Msa2Inf.py
index 5873b1d19..04c86026d 100644
--- a/BaseTools/Source/Python/msa2inf/Msa2Inf.py
+++ b/BaseTools/Source/Python/msa2inf/Msa2Inf.py
@@ -1,8 +1,8 @@
## @file
# Convert an XML-based MSA file to a text-based INF file.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/msa2inf/StoreInf.py b/BaseTools/Source/Python/msa2inf/StoreInf.py
index 6bf46cf0b..d7f6869d7 100644
--- a/BaseTools/Source/Python/msa2inf/StoreInf.py
+++ b/BaseTools/Source/Python/msa2inf/StoreInf.py
@@ -1,8 +1,8 @@
## @file
# Store a Module class object to an INF file.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/msa2inf/__init__.py b/BaseTools/Source/Python/msa2inf/__init__.py
index e139a80bd..ed1749bd1 100644
--- a/BaseTools/Source/Python/msa2inf/__init__.py
+++ b/BaseTools/Source/Python/msa2inf/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/sitecustomize.py b/BaseTools/Source/Python/sitecustomize.py
index cd315e022..22501f8ba 100644
--- a/BaseTools/Source/Python/sitecustomize.py
+++ b/BaseTools/Source/Python/sitecustomize.py
@@ -1,7 +1,7 @@
#
-# Copyright (c) 2009 - 2010, Apple, Inc. All rights reserved.
+# Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR>
#
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/spd2dec/ConvertPackage.py b/BaseTools/Source/Python/spd2dec/ConvertPackage.py
index 57bc098bf..f07422528 100644
--- a/BaseTools/Source/Python/spd2dec/ConvertPackage.py
+++ b/BaseTools/Source/Python/spd2dec/ConvertPackage.py
@@ -2,8 +2,8 @@
# Convert an SPD Package class object ot a DEC Package class object by filling
# some fields required by DEC file.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/spd2dec/LoadSpd.py b/BaseTools/Source/Python/spd2dec/LoadSpd.py
index e94e7fc31..e82a9bfa8 100644
--- a/BaseTools/Source/Python/spd2dec/LoadSpd.py
+++ b/BaseTools/Source/Python/spd2dec/LoadSpd.py
@@ -1,8 +1,8 @@
## @file
# Open an SPD file and load all its contents to a PackageClass object.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/spd2dec/Spd2Dec.py b/BaseTools/Source/Python/spd2dec/Spd2Dec.py
index 46d058344..2d2814ae0 100644
--- a/BaseTools/Source/Python/spd2dec/Spd2Dec.py
+++ b/BaseTools/Source/Python/spd2dec/Spd2Dec.py
@@ -1,8 +1,8 @@
## @file
# Convert an XML-based SPD file to a text-based DEC file.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/spd2dec/StoreDec.py b/BaseTools/Source/Python/spd2dec/StoreDec.py
index 67cbd11e9..f3805f621 100644
--- a/BaseTools/Source/Python/spd2dec/StoreDec.py
+++ b/BaseTools/Source/Python/spd2dec/StoreDec.py
@@ -1,8 +1,8 @@
## @file
# Store a Package class object to a DEC file.
#
-# Copyright (c) 2007, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
diff --git a/BaseTools/Source/Python/spd2dec/__init__.py b/BaseTools/Source/Python/spd2dec/__init__.py
index ed0302b48..41e5b2656 100644
--- a/BaseTools/Source/Python/spd2dec/__init__.py
+++ b/BaseTools/Source/Python/spd2dec/__init__.py
@@ -4,8 +4,8 @@
# This file is required to make Python interpreter treat the directory
# as containing package.
#
-# Copyright (c) 2007 - 2010, Intel Corporation<BR>
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php