diff options
Diffstat (limited to 'BaseTools/Source/Python')
-rw-r--r-- | BaseTools/Source/Python/build/build.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index e9baf3465e..7d68b45417 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -997,11 +997,6 @@ class Build(): try:
#os.rmdir(AutoGenObject.BuildDir)
RemoveDirectory(AutoGenObject.BuildDir, True)
- #
- # First should close DB.
- #
- self.Db.Close()
- RemoveDirectory(os.path.dirname(GlobalData.gDatabasePath), True)
except WindowsError, X:
EdkLogger.error("build", FILE_DELETE_FAILURE, ExtraData=str(X))
return True
@@ -1091,11 +1086,6 @@ class Build(): try:
#os.rmdir(AutoGenObject.BuildDir)
RemoveDirectory(AutoGenObject.BuildDir, True)
- #
- # First should close DB.
- #
- self.Db.Close()
- RemoveDirectory(os.path.dirname(GlobalData.gDatabasePath), True)
except WindowsError, X:
EdkLogger.error("build", FILE_DELETE_FAILURE, ExtraData=str(X))
return True
@@ -1805,6 +1795,10 @@ class Build(): self.SpawnMode = False
self._BuildModule()
+ if self.Target == 'cleanall':
+ self.Db.Close()
+ RemoveDirectory(os.path.dirname(GlobalData.gDatabasePath), True)
+
def CreateAsBuiltInf(self):
for Module in self.BuildModules:
Module.CreateAsBuiltInf()
|