BaseTools: Clean the ffs folder before generating files in it
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2965
The content in Guid.xref depends on the files under the corresponding
ffs folder.(refer to the commit 5e9256cd7f)
To make Guid.xref update in the incremental build,
clean the files under that ffs folder before generating files in it.
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Reviewed-by: Yuwei Chen<yuwei.chen@intel.com>
This commit is contained in:
@@ -21,6 +21,7 @@ from .GuidSection import GuidSection
|
||||
from .FvImageSection import FvImageSection
|
||||
from .Ffs import FdfFvFileTypeToFileType
|
||||
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||
import shutil
|
||||
|
||||
## generate FFS from FILE
|
||||
#
|
||||
@@ -67,6 +68,8 @@ class FileStatement (FileStatementClassObject):
|
||||
if FvName:
|
||||
Str += FvName
|
||||
OutputDir = os.path.join(GenFdsGlobalVariable.FfsDir, Str)
|
||||
if os.path.exists(OutputDir):
|
||||
shutil.rmtree(OutputDir)
|
||||
if not os.path.exists(OutputDir):
|
||||
os.makedirs(OutputDir)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user