build script: handle additional options for target installation

This commit is contained in:
alexey.lysiuk 2020-11-30 11:28:32 +02:00
parent 3a0831425b
commit 446de1778e

View file

@ -77,15 +77,18 @@ class Target:
def post_build(self, builder: 'Builder'):
pass
def install(self, builder: 'Builder'):
def install(self, builder: 'Builder', options: 'CommandLineOptions' = None):
if builder.xcode:
return
if os.path.exists(self.prefix):
shutil.rmtree(self.prefix)
args = ['make', 'install']
args += options and options.to_list() or []
work_path = builder.build_path + self.src_root
subprocess.check_call(['make', 'install'], cwd=work_path)
subprocess.check_call(args, cwd=work_path)
class MakeTarget(Target):