]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/FfsFileStatement.py
License header updated to match correct format.
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / FfsFileStatement.py
index 013dbb1f02fb99e335c23fc516847576362de4f1..cd099196d089f98eace4dc682a93500e144d55e6 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # process FFS generation from FILE statement\r
 #\r
-#  Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -17,7 +17,7 @@
 #\r
 import Ffs\r
 import Rule\r
-import os\r
+import Common.LongFilePathOs as os\r
 import StringIO\r
 import subprocess\r
 \r
@@ -39,6 +39,10 @@ class FileStatement (FileStatementClassObject) :
     #\r
     def __init__(self):\r
         FileStatementClassObject.__init__(self)\r
+        self.CurrentLineNum = None\r
+        self.CurrentLineContent = None\r
+        self.FileName = None\r
+        self.InfFileName = None\r
 \r
     ## GenFfs() method\r
     #\r
@@ -67,7 +71,7 @@ class FileStatement (FileStatementClassObject) :
         \r
         OutputDir = os.path.join(GenFdsGlobalVariable.FfsDir, self.NameGuid)\r
         if not os.path.exists(OutputDir):\r
-             os.makedirs(OutputDir)\r
+            os.makedirs(OutputDir)\r
 \r
         Dict.update(self.DefineVarDict)\r
         SectionAlignments = None\r
@@ -88,6 +92,8 @@ class FileStatement (FileStatementClassObject) :
 \r
         elif self.FileName != None:\r
             self.FileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FileName)\r
+            #Replace $(SAPCE) with real space\r
+            self.FileName = self.FileName.replace('$(SPACE)', ' ')\r
             SectionFiles = [GenFdsGlobalVariable.MacroExtend(self.FileName, Dict)]\r
 \r
         else:\r
@@ -106,6 +112,8 @@ class FileStatement (FileStatementClassObject) :
                 if FvParentAddr != None and isinstance(section, GuidSection):\r
                     section.FvParentAddr = FvParentAddr\r
 \r
+                if self.KeepReloc == False:\r
+                    section.KeepReloc = False\r
                 sectList, align = section.GenSection(OutputDir, self.NameGuid, SecIndex, self.KeyStringList, None, Dict)\r
                 if sectList != []:\r
                     for sect in sectList:\r