mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 803400 - Add clobber mach command; r=glandium
DONTBUILD (NPOTB)
This commit is contained in:
parent
3864e2ca62
commit
aeb01bc5bd
1
mach
1
mach
@ -32,6 +32,7 @@ SEARCH_PATHS = [
|
||||
'testing',
|
||||
'testing/xpcshell',
|
||||
'testing/mozbase/mozprocess',
|
||||
'testing/mozbase/mozfile',
|
||||
'testing/mozbase/mozinfo',
|
||||
]
|
||||
|
||||
|
@ -13,6 +13,8 @@ import which
|
||||
from mach.mixin.logging import LoggingMixin
|
||||
from mach.mixin.process import ProcessExecutionMixin
|
||||
|
||||
from mozfile.mozfile import rmtree
|
||||
|
||||
from .config import BuildConfig
|
||||
from .mozconfig import (
|
||||
MozconfigFindException,
|
||||
@ -82,6 +84,13 @@ class MozbuildObject(ProcessExecutionMixin):
|
||||
def statedir(self):
|
||||
return os.path.join(self.topobjdir, '.mozbuild')
|
||||
|
||||
def remove_objdir(self):
|
||||
"""Remove the entire object directory."""
|
||||
|
||||
# We use mozfile because it is faster than shutil.rmtree().
|
||||
# mozfile doesn't like unicode arguments (bug 818783).
|
||||
rmtree(self.topobjdir.encode('utf-8'))
|
||||
|
||||
@property
|
||||
def _config_guess(self):
|
||||
if self._config_guess_output is None:
|
||||
|
@ -61,6 +61,11 @@ class Build(MachCommandBase):
|
||||
|
||||
return status
|
||||
|
||||
@Command('clobber', help='Clobber the tree (delete the object directory).')
|
||||
def clobber(self):
|
||||
self.remove_objdir()
|
||||
return 0
|
||||
|
||||
|
||||
@CommandProvider
|
||||
class Warnings(MachCommandBase):
|
||||
|
Loading…
Reference in New Issue
Block a user