mirror of https://github.com/acidanthera/audk.git
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:
parent
aec99d9bc3
commit
a8c77eba37
|
@ -21,6 +21,7 @@ from .GuidSection import GuidSection
|
||||||
from .FvImageSection import FvImageSection
|
from .FvImageSection import FvImageSection
|
||||||
from .Ffs import FdfFvFileTypeToFileType
|
from .Ffs import FdfFvFileTypeToFileType
|
||||||
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
|
import shutil
|
||||||
|
|
||||||
## generate FFS from FILE
|
## generate FFS from FILE
|
||||||
#
|
#
|
||||||
|
@ -67,6 +68,8 @@ class FileStatement (FileStatementClassObject):
|
||||||
if FvName:
|
if FvName:
|
||||||
Str += FvName
|
Str += FvName
|
||||||
OutputDir = os.path.join(GenFdsGlobalVariable.FfsDir, Str)
|
OutputDir = os.path.join(GenFdsGlobalVariable.FfsDir, Str)
|
||||||
|
if os.path.exists(OutputDir):
|
||||||
|
shutil.rmtree(OutputDir)
|
||||||
if not os.path.exists(OutputDir):
|
if not os.path.exists(OutputDir):
|
||||||
os.makedirs(OutputDir)
|
os.makedirs(OutputDir)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue