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)
downloadedk2-platforms-40d841f6a8f84e75409178e19e69b95e01bada0f.tar.xz
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 fa434e810a..3b8024c199 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 cbe7d60f3f..73b4a97417 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 a913cf4e5a..824e5e0583 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 f456f0d25e..b652051ac1 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 b58d0c641f..e3f5c2b6ec 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 903ac3cd0d..1759da72dd 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 717c10f266..8f929a33cb 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 737cb0c9ab..d2de425732 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 a49de46401..9986ba2b0d 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 dd33380a1e..982d710ce5 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 e645337a39..5c0a79f291 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 b95ff621cc..ffa485979d 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 7c572a56f0..1982dd05a0 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 3c968f5ec6..e3460e9891 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 c25580ac37..943bc6948e 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 a494e814a6..d041b35411 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 c33b9bff0b..69a67eda39 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 ce4cfa14bb..a3bcb3a147 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 e0df1c20c2..3e7d44954c 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 b181e65d16..5d0fd7f67b 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 d56152ec8a..6c7f085810 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 a9b2f33d55..f43150dfc1 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 7127cc5cff..e774d80d69 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 179b75e28a..020addfdb7 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 8573f0b692..b15daa8448 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 546dd37772..126985fdac 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 3884b0521c..ce1e60338e 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 5da0cacfb0..1f199fe2ca 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 70178f54ce..fc5d589a59 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 5a9a3096bb..549f76cee9 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 4d60115925..dcafb5f156 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 e5fedae83d..5823067056 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 b289a2b0d8..d8a96f9bfb 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 e226f1b0d6..509601007c 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 00f4be8332..a0eddc2365 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 cd8bd4cb7f..b433299452 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 a6953b8c5a..a459cad8ba 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 350350bdf4..399d328752 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 1382b80839..82e7394ced 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 1966fb9f8c..46329ba1d7 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 8f81773a95..5c565408bf 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 a34f5902bb..e344088f36 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 947ac4c8e3..a72d4ee3c2 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 e56a79a43d..511d429f26 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 a8ec638fce..dbfedb514b 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 1c5c5e4df2..3bf1c45150 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 d95faeef6a..134b15f81e 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 bd9313cef4..310cb5716b 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 c9311f65a5..9520be4345 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 4b5c319c35..62b265bbaa 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 8e8f24b8c8..29e4aca0d0 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 f6c4097e78..985737f192 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 733408551a..ff8736059f 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 810087ea07..689aee0975 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 fb4239f474..36ad6e492f 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 1874739915..a52c78ec31 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 f385b1e670..880ad499f4 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 1085da942b..941392be0f 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 a3215aedaa..973bc68b38 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 58cb600e46..9102de6fef 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 947ac4c8e3..a72d4ee3c2 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 e56a79a43d..511d429f26 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 6dc30a3baf..db5f40a6a4 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 349f934304..4e8cef2c42 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 e3fb4f2ddf..ce38a0fa92 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 815907dfdd..ee7f3197a1 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 a70a60b819..43fd57a8de 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 17005f30f6..0b3686a586 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 602639e5bd..b377ef6f41 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 ad88491bae..d54c2233d8 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 06f775f803..6750f5a0c9 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 6850c8d32a..9ef71a9587 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 af8333af23..2e3f5e4983 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 34002ba7d8..024f6d87be 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 ecd6a071f7..c184a687d8 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 8b11ed378f..f191dd4efc 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 8d79301f3e..c9dbe8e4f1 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 df2630319f..b648fcaf0e 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 2f357a63d2..e489c10753 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 92a9794f51..bb40d756c8 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 67f9956e1d..17761f2e24 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 961b88a458..fb9213b467 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 0940094de0..85307b90c6 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 8a7540fe25..1cf926155b 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 7e126678a2..4bcf286c23 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 7f24b51fc3..dff4691462 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 8650a73eb5..39678b23e9 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 ad953facb9..5419e11fce 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 26de500d9b..cbfd6715ca 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 1e87eb410e..ea19156daf 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 438bd186dc..d9f1cdaff0 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 b0b1b00c7e..013dbb1f02 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 b00e5a2178..d95af34dfc 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 8d2ef1d874..7b6305b48e 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 c945ce9b9b..f5d3f4f9a5 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 5e9a02299c..cb82c717dd 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 cad2758627..e9eace9c39 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 d967880472..0ef5a23716 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 c360c6d9ad..a98d208e1d 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 8cd7429d58..d64f836164 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 28e77aad5f..ce46413bf6 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 99f1ac39ac..09971b3cd0 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 40a5f88bab..0e112cf15e 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 63e65c5970..36c483fbb2 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 c6fdbd88dc..061f984e6a 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 2e24697a3d..8c884b6e10 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 e660055f9a..e1b69ed133 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 e27d0a20f9..3fca4064f0 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 eebc7b1dab..2bea9346cf 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 1c5796affe..6ba4ed4431 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 38398221dc..74ad01166c 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 d6a199f7d5..58a5b1d630 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 0b103f2b1a..26aacf947f 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 16f7a6bb2e..37fff885a8 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 09245344a1..2c81c995bd 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 6eb8a1e573..4c44c24731 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 6b2e9b2857..86ef629584 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 402694054e..7956c8a2ae 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 ebf9077840..8e4d45da21 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 8661edbca4..6da3e18975 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 ec2136811d..f6d693d2da 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 12544927c9..6194231441 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 ffe34bd924..38908a331f 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 9a9f1d0468..7212522cb3 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 7ec3e7e672..a17d05f6b9 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 9a9657a4b3..c311df91c2 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 1e5fe47af1..9c3d7bd934 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 f570fd1d10..6b7d22c938 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 62608a061a..69477d544d 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 2d98129e4f..dd465b68b2 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 317bd4149b..5fb8cd8232 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 9be64942ec..86dddd0f2b 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 c013d0d2fe..3d7c2d0ea5 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 3cf33f20e2..bcd6d6e1c1 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 65ca1ce25c..b6e300b150 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 ba91d175f0..19623f98f4 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 4ad9dc5e55..e1d2537394 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 777a479156..2e7fd539f7 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 ea0b26743f..c6424a5933 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 df3ed2f6bb..68c55718bc 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 cbc78a7322..0187a7a74a 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 dbfa84a5da..d19bb09b2d 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 36c2ebf491..f0fef4dda3 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 c8166bfa90..64f0480c37 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 eb2e038b5d..70c6e62fe9 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 22e2afa4c9..d8dacacd64 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 5b20c4091c..12c3324b8d 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 27a969bb27..05cd34bad5 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 329352204d..af03e1f982 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 1c7f31a8bc..64cf63b635 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 f608dee9b8..545ffa39aa 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 528dbf3ddb..68fa79e7a4 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 cc97ec5521..fe271ac85b 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 d3c724832c..8e360b9b5b 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 8d07ab9c5b..f8123a2f97 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 4831e80db7..f9d3a2197f 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 496e108b1f..0d65e2bb51 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 af9aa1d8ec..2a118ae51e 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 f1c8d60d75..6d6633b893 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 4995f2cd0c..5bf80300a8 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 5873b1d198..04c86026de 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 6bf46cf0be..d7f6869d76 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 e139a80bdb..ed1749bd12 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 cd315e022f..22501f8bae 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 57bc098bfa..f074225280 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 e94e7fc317..e82a9bfa80 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 46d058344b..2d2814ae0d 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 67cbd11e9b..f3805f6210 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 ed0302b48d..41e5b2656e 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