Validate setting of install_tag for CustomTarget

pull/10324/head
Ferdinand Thiessen 3 years ago committed by Xavier Claessens
parent 6f156e8ddd
commit 157d438835
  1. 10
      mesonbuild/build.py

@ -2450,13 +2450,9 @@ class CustomTarget(Target, CommandBase):
self.install = install self.install = install
self.install_dir = list(install_dir or []) self.install_dir = list(install_dir or [])
self.install_mode = install_mode self.install_mode = install_mode
_install_tag: T.List[T.Optional[str]] _install_tag: T.List[T.Optional[str]] = [None] if not install_tag else stringlistify(install_tag)
if not install_tag: if len(_install_tag) == 1:
_install_tag = [None] * len(self.outputs) _install_tag = list(_install_tag) * len(self.outputs)
elif len(install_tag) == 1:
_install_tag = list(install_tag) * len(self.outputs)
else:
_install_tag = list(install_tag)
self.install_tag = _install_tag self.install_tag = _install_tag
self.name = name if name else self.outputs[0] self.name = name if name else self.outputs[0]

Loading…
Cancel
Save