mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-22 03:51:33 +00:00
build script: add clean special target
This commit is contained in:
parent
5083a3c683
commit
33ec97ea4b
1 changed files with 12 additions and 0 deletions
12
build.py
12
build.py
|
@ -862,6 +862,15 @@ class ZlibTarget(ConfigureMakeDependencyTarget):
|
|||
return os.path.exists(builder.source_path + 'zlib.pc.in')
|
||||
|
||||
|
||||
class CleanTarget(BaseTarget):
|
||||
def __init__(self, name='clean'):
|
||||
super().__init__(name)
|
||||
|
||||
def build(self, builder: 'Builder'):
|
||||
args = ('git', 'clean', '-dfX')
|
||||
subprocess.check_call(args, cwd=builder.root_path)
|
||||
|
||||
|
||||
# Case insensitive dictionary class from
|
||||
# https://github.com/psf/requests/blob/v2.25.0/requests/structures.py
|
||||
|
||||
|
@ -1064,6 +1073,9 @@ class Builder(object):
|
|||
SndFileTarget(),
|
||||
VorbisTarget(),
|
||||
ZlibTarget(),
|
||||
|
||||
# Special
|
||||
CleanTarget(),
|
||||
)
|
||||
|
||||
self.targets = CaseInsensitiveDict({target.name: target for target in targets})
|
||||
|
|
Loading…
Reference in a new issue