mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Simplify clean option of prepare.py.
This commit is contained in:
parent
1039959cd3
commit
d93fc2332a
1 changed files with 6 additions and 8 deletions
14
prepare.py
14
prepare.py
|
|
@ -44,9 +44,10 @@ class IOSTarget(prepare.Target):
|
|||
]
|
||||
|
||||
def clean(self):
|
||||
prepare.Target.clean(self)
|
||||
if os.path.isdir('liblinphone-sdk/apple-darwin'):
|
||||
shutil.rmtree('liblinphone-sdk/apple-darwin', ignore_errors=False, onerror=self.handle_remove_read_only)
|
||||
if os.path.isdir('WORK'):
|
||||
shutil.rmtree('WORK', ignore_errors=False, onerror=self.handle_remove_read_only)
|
||||
if os.path.isdir('liblinphone-sdk'):
|
||||
shutil.rmtree('liblinphone-sdk', ignore_errors=False, onerror=self.handle_remove_read_only)
|
||||
|
||||
|
||||
class IOSi386Target(IOSTarget):
|
||||
|
|
@ -120,8 +121,7 @@ def main(argv = None):
|
|||
if argv is None:
|
||||
argv = sys.argv
|
||||
argparser = argparse.ArgumentParser(description="Prepare build of Linphone and its dependencies.")
|
||||
argparser.add_argument('-c', '--clean', help="Clean a previous build instead of preparing a build.", action='store_true')
|
||||
argparser.add_argument('-C', '--veryclean', help="Clean a previous build and its installation directory.", action='store_true')
|
||||
argparser.add_argument('-c', '-C', '--clean', help="Clean a previous build instead of preparing a build.", action='store_true')
|
||||
argparser.add_argument('-d', '--debug', help="Prepare a debug build.", action='store_true')
|
||||
argparser.add_argument('-f', '--force', help="Force preparation, even if working directory already exist.", action='store_true')
|
||||
argparser.add_argument('-L', '--list-cmake-variables', help="List non-advanced CMake cache variables.", action='store_true', dest='list_cmake_variables')
|
||||
|
|
@ -145,9 +145,7 @@ def main(argv = None):
|
|||
for platform in selected_platforms:
|
||||
target = targets[platform]
|
||||
|
||||
if args.veryclean:
|
||||
target.veryclean()
|
||||
elif args.clean:
|
||||
if args.clean:
|
||||
target.clean()
|
||||
else:
|
||||
retcode = prepare.run(target, args.debug, False, args.list_cmake_variables, args.force, additional_args)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue