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
5e9256cd7f54ffd6f1fd9837df92a911fcd2d7c2)
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>
from .FvImageSection import FvImageSection\r
from .Ffs import FdfFvFileTypeToFileType\r
from .GenFdsGlobalVariable import GenFdsGlobalVariable\r
+import shutil\r
\r
## generate FFS from FILE\r
#\r
if FvName:\r
Str += FvName\r
OutputDir = os.path.join(GenFdsGlobalVariable.FfsDir, Str)\r
+ if os.path.exists(OutputDir):\r
+ shutil.rmtree(OutputDir)\r
if not os.path.exists(OutputDir):\r
os.makedirs(OutputDir)\r
\r