Sync BaseTools Branch (version r2323) to EDKII main trunk.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 19 Sep 2011 09:03:59 +0000 (09:03 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 19 Sep 2011 09:03:59 +0000 (09:03 +0000)
Signed-off-by: lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12379 6f19259b-4bc3-4df7-8a09-765794883524

34 files changed:
BaseTools/Bin/Win32/BPDG.exe
BaseTools/Bin/Win32/BootSectImage.exe
BaseTools/Bin/Win32/EfiLdrImage.exe
BaseTools/Bin/Win32/EfiRom.exe
BaseTools/Bin/Win32/Fpd2Dsc.exe
BaseTools/Bin/Win32/GenBootSector.exe
BaseTools/Bin/Win32/GenCrc32.exe
BaseTools/Bin/Win32/GenDepex.exe
BaseTools/Bin/Win32/GenFds.exe
BaseTools/Bin/Win32/GenFfs.exe
BaseTools/Bin/Win32/GenFv.exe
BaseTools/Bin/Win32/GenFw.exe
BaseTools/Bin/Win32/GenPage.exe
BaseTools/Bin/Win32/GenPatchPcdTable.exe
BaseTools/Bin/Win32/GenSec.exe
BaseTools/Bin/Win32/GenVtf.exe
BaseTools/Bin/Win32/LzmaCompress.exe
BaseTools/Bin/Win32/MigrationMsa2Inf.exe
BaseTools/Bin/Win32/PatchPcdValue.exe
BaseTools/Bin/Win32/Spd2Dec.exe
BaseTools/Bin/Win32/Split.exe
BaseTools/Bin/Win32/TargetTool.exe
BaseTools/Bin/Win32/TianoCompress.exe
BaseTools/Bin/Win32/Trim.exe
BaseTools/Bin/Win32/UPT.exe
BaseTools/Bin/Win32/VfrCompile.exe
BaseTools/Bin/Win32/VolInfo.exe
BaseTools/Bin/Win32/build.exe
BaseTools/Source/C/Include/Common/BuildVersion.h
BaseTools/Source/Python/AutoGen/AutoGen.py
BaseTools/Source/Python/Common/BuildVersion.py
BaseTools/Source/Python/Common/GlobalData.py
BaseTools/Source/Python/GenFds/FdfParser.py
BaseTools/Source/Python/build/build.py

index cce2e89c8789dc409b9c0040b0e6bf81f74163e7..9d2cc2b823ba109d526a87db0c49700b0657b94c 100644 (file)
Binary files a/BaseTools/Bin/Win32/BPDG.exe and b/BaseTools/Bin/Win32/BPDG.exe differ
index abfde7d1e7ca21b9b42ab0ede798f51956dfea8a..1ac08a171e75129167c2e196542d3171aa3d306d 100755 (executable)
Binary files a/BaseTools/Bin/Win32/BootSectImage.exe and b/BaseTools/Bin/Win32/BootSectImage.exe differ
index 7089e79ff8035b3fc6c41ce51d680e5326350848..e1c47508e2918af21f052524668a2b3624f7b6dc 100755 (executable)
Binary files a/BaseTools/Bin/Win32/EfiLdrImage.exe and b/BaseTools/Bin/Win32/EfiLdrImage.exe differ
index 41f1a44d95cea569642bc55a49a1c4eca4221f8d..73c638f42121d3caeeb1bac829c8d08efc095124 100755 (executable)
Binary files a/BaseTools/Bin/Win32/EfiRom.exe and b/BaseTools/Bin/Win32/EfiRom.exe differ
index 440eddf31ed91a19d0649ba021cfe725f1d9bdc6..da0b3957dc8e262770a43c43438ecfacb5a44a73 100755 (executable)
Binary files a/BaseTools/Bin/Win32/Fpd2Dsc.exe and b/BaseTools/Bin/Win32/Fpd2Dsc.exe differ
index 1858a919edca55812fd787e6adea2bb5ef961e5b..62a576b1a65204b928ded06d1819c2e398c28ea0 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenBootSector.exe and b/BaseTools/Bin/Win32/GenBootSector.exe differ
index fe89c558599de1d3cc2d11bdf8ade2b21d988087..2a4fa4647abbf5e58b2b541acab30ee875b549f2 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenCrc32.exe and b/BaseTools/Bin/Win32/GenCrc32.exe differ
index 598885a38534750fd7babd3c1d7d793456cc911f..4330f6d09f1dc544e99f6c4b1815880460cc1be7 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenDepex.exe and b/BaseTools/Bin/Win32/GenDepex.exe differ
index 6a1e2183adf5181ab041ebc14acd3aa0c9bd8df6..a0c20def4d03041bcd029fc44ad351755741d9c1 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenFds.exe and b/BaseTools/Bin/Win32/GenFds.exe differ
index a8fa960677006077f06f7aedb2031fb4317d531e..fa31eeee4696bfafd87edd2b2ddf8c641b18401e 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenFfs.exe and b/BaseTools/Bin/Win32/GenFfs.exe differ
index b9f1e3f65e07893c03b161a1db9c7625330e3111..08f4320f87312ed8c3d870ac360074e51a4d3668 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenFv.exe and b/BaseTools/Bin/Win32/GenFv.exe differ
index d03c522c49312938259fa5dc0443c7b5a1bf1e4c..8eab045150694693cacba94aa53e962c5cf4f644 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenFw.exe and b/BaseTools/Bin/Win32/GenFw.exe differ
index 8cff0a6243a083c265a05a1b8ed260367c00c5de..8c7097c00731dfa965bbc313a038565d754a5186 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenPage.exe and b/BaseTools/Bin/Win32/GenPage.exe differ
index c923fa62e6cbb7319b00f685723520c0b1cf893d..2371e995e846e1d99ff46312d63a5b1cfe023efd 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenPatchPcdTable.exe and b/BaseTools/Bin/Win32/GenPatchPcdTable.exe differ
index 882356961e4ac2d83d561dc044a2d637173b1514..9dbdb062e085771f51ab8cc6c552f8e3e5a3eb12 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenSec.exe and b/BaseTools/Bin/Win32/GenSec.exe differ
index 47ca3d9e4492b45f3114da48b817661553695f2a..88e3bc42f5b152faf6a24b552313a17d2e5d55bf 100755 (executable)
Binary files a/BaseTools/Bin/Win32/GenVtf.exe and b/BaseTools/Bin/Win32/GenVtf.exe differ
index 1d5616f0e764e4d24f9dfcb6f9ac1dd3f2a39ec9..7c0d8d1363d9dae87ef6946966e49d631e4cbede 100755 (executable)
Binary files a/BaseTools/Bin/Win32/LzmaCompress.exe and b/BaseTools/Bin/Win32/LzmaCompress.exe differ
index 890e35c46deb2f80b2efec86eb2e4363f6e0d83e..a6ed5abd747a645ba1012086b5d59d2e333f9054 100755 (executable)
Binary files a/BaseTools/Bin/Win32/MigrationMsa2Inf.exe and b/BaseTools/Bin/Win32/MigrationMsa2Inf.exe differ
index 9fb2f91235fbf0e281a7e36134e779d377824e8f..5d6a2aa0e76852a0c858ca831309cbccce7fa69a 100755 (executable)
Binary files a/BaseTools/Bin/Win32/PatchPcdValue.exe and b/BaseTools/Bin/Win32/PatchPcdValue.exe differ
index 65fc553450589dd967da470e223a932cd90a3997..60fdb26dd0b3c2532c10db322d195052d2dcca0a 100755 (executable)
Binary files a/BaseTools/Bin/Win32/Spd2Dec.exe and b/BaseTools/Bin/Win32/Spd2Dec.exe differ
index cac49ca6c30bf5991c7e2209df8a537ece8243cc..761f80531522350d11d025fa4bf384a005dcb0ed 100755 (executable)
Binary files a/BaseTools/Bin/Win32/Split.exe and b/BaseTools/Bin/Win32/Split.exe differ
index e709181fcf61c04fe7b27943fbfbac64f37416f0..7550a5efeeae06a06feeb23884544cab1ccfbc02 100755 (executable)
Binary files a/BaseTools/Bin/Win32/TargetTool.exe and b/BaseTools/Bin/Win32/TargetTool.exe differ
index f6208674bf8c43277f9b8c3417001eb2ffbcaa70..25b80ed9b71ec90a5f94f2053f9a8aeaa9cbd3bf 100755 (executable)
Binary files a/BaseTools/Bin/Win32/TianoCompress.exe and b/BaseTools/Bin/Win32/TianoCompress.exe differ
index acbc1a2f561c5ff542a75b191a0f3c300472fcdb..85ca31b554a9d9d230f9e4edba0b512515fd30f6 100755 (executable)
Binary files a/BaseTools/Bin/Win32/Trim.exe and b/BaseTools/Bin/Win32/Trim.exe differ
index 834fb6bbb7206529f9a6f26b80123708c196afa6..396397d92e7fa22400bdf05de62c6e712494c9cb 100644 (file)
Binary files a/BaseTools/Bin/Win32/UPT.exe and b/BaseTools/Bin/Win32/UPT.exe differ
index 76d39577a3e0e51fbe71d23f874ba05ca072e400..3e37b6711e08860447c2f71161780b87b67294f3 100755 (executable)
Binary files a/BaseTools/Bin/Win32/VfrCompile.exe and b/BaseTools/Bin/Win32/VfrCompile.exe differ
index 5ad44f76ea766b400eb40f630529c1cb196329bf..ef8ac32eb2a0185edcec71041dbc3616ae42b32c 100755 (executable)
Binary files a/BaseTools/Bin/Win32/VolInfo.exe and b/BaseTools/Bin/Win32/VolInfo.exe differ
index 09647090ef6ba64e32d6525c1c9617dc2d18095e..0f899504f1c3be8dd2ed27de5e50e9efd221ce13 100755 (executable)
Binary files a/BaseTools/Bin/Win32/build.exe and b/BaseTools/Bin/Win32/build.exe differ
index 141f70b25adae21c3abf464b4d1cb00ce46b6b1d..3e1f8f93fa8e8cbfa33f017e757ba01fd6cc1870 100644 (file)
@@ -1,3 +1,3 @@
 //This file is for build version number auto generation\r
 //\r
-#define __BUILD_VERSION "Build 2318"\r
+#define __BUILD_VERSION "Build 2322"\r
index d51c59e2048d9d43483c81fbb1acd0e967179ad1..55a6a81ccca3c922421f42ac6b068cc2b6031399 100644 (file)
@@ -207,8 +207,13 @@ class WorkspaceAutoGen(AutoGen):
             # Make global macros available when parsing FDF file\r
             #\r
             InputMacroDict.update(self.BuildDatabase.WorkspaceDb._GlobalMacros)\r
+            #\r
+            # Mark now build in AutoGen Phase\r
+            #\r
+            GlobalData.gAutoGenPhase = True            \r
             Fdf = FdfParser(self.FdfFile.Path)\r
             Fdf.ParseFile()\r
+            GlobalData.gAutoGenPhase = False  \r
             PcdSet = Fdf.Profile.PcdDict\r
             ModuleList = Fdf.Profile.InfList\r
             self.FdfProfile = Fdf.Profile\r
index 7425810fe3a2e1f8549f54203f0adae8fa78dcfd..48316716b1fe0e65e8b2be6dc12176b6a468d746 100644 (file)
@@ -1,3 +1,3 @@
 #This file is for build version number auto generation\r
 #\r
-gBUILD_VERSION = "Build 2318"\r
+gBUILD_VERSION = "Build 2322"\r
index ec6456faac257edfa3a8f63ddcd361f56e9780ec..37ae2d33ebd86fbd057a8173f8f5df8061d8d317 100644 (file)
@@ -34,3 +34,7 @@ gBuildingModule = ''
 
 ## Regular expression for matching macro used in DSC/DEC/INF file inclusion
 gMacroPattern = re.compile("\$\(([_A-Z][_A-Z0-9]*)\)", re.UNICODE)
+#
+# A global variable for whether current build in AutoGen phase or not.
+#
+gAutoGenPhase = False
index c4b3f273f07a3ae34384894e1f86adb9dd835e2c..6a9e5b7b4035e6e01a389145ae91b7fed3b72b32 100644 (file)
@@ -45,6 +45,7 @@ from Common.BuildToolError import *
 from Common import EdkLogger\r
 from Common.Misc import PathClass\r
 from Common.String import NormPath\r
+from Common import GlobalData\r
 \r
 import re\r
 import os\r
@@ -2416,10 +2417,20 @@ class FdfParser:
         else:\r
             FfsFileObj.FileName = self.__Token\r
             if FfsFileObj.FileName.replace('$(WORKSPACE)', '').find('$') == -1:\r
-                #do case sensitive check for file path\r
-                ErrorCode, ErrorInfo = PathClass(NormPath(FfsFileObj.FileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()\r
-                if ErrorCode != 0:\r
-                    EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)\r
+                #\r
+                # For file in OUTPUT_DIRECTORY will not check whether it exist or not at AutoGen phase.\r
+                #\r
+                if not GlobalData.gAutoGenPhase:\r
+                    #do case sensitive check for file path\r
+                    ErrorCode, ErrorInfo = PathClass(NormPath(FfsFileObj.FileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()\r
+                    if ErrorCode != 0:\r
+                        EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)\r
+                else:\r
+                    if not InputMacroDict["OUTPUT_DIRECTORY"] in FfsFileObj.FileName:\r
+                        #do case sensitive check for file path\r
+                        ErrorCode, ErrorInfo = PathClass(NormPath(FfsFileObj.FileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()\r
+                        if ErrorCode != 0:\r
+                            EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)                    \r
 \r
         if not self.__IsToken( "}"):\r
             raise Warning("expected '}'", self.FileName, self.CurrentLineNumber)\r
index 51deb3890cae6b9e44dc057b9f4e9530dc97e5ce..9502bf3364442a5e3454d964013b95fd1367afe6 100644 (file)
@@ -912,6 +912,10 @@ class Build():
                 EdkLogger.info("No flash definition file found. FV [%s] will be ignored." % " ".join(self.FvList))\r
                 self.FvList = []\r
         else:\r
+            #\r
+            # Mark now build in AutoGen Phase\r
+            #\r
+            GlobalData.gAutoGenPhase = True\r
             FdfParserObj = FdfParser(str(self.Fdf))\r
             for key in self.Db._GlobalMacros:\r
                 InputMacroDict[key] = self.Db._GlobalMacros[key]\r
@@ -920,6 +924,7 @@ class Build():
                 if fvname.upper() not in FdfParserObj.Profile.FvDict.keys():\r
                     EdkLogger.error("build", OPTION_VALUE_INVALID,\r
                                     "No such an FV in FDF file: %s" % fvname)\r
+            GlobalData.gAutoGenPhase = False\r
 \r
         #\r
         # Merge Arch\r