mirror of
https://gitlab.com/ita1024/waf.git
synced 2025-01-24 09:20:00 +01:00
Exclude install vapi paths and empty installation tasks
This commit is contained in:
parent
15fb3a33eb
commit
3de21ec448
@ -9,7 +9,7 @@ this tool to be too stable either (apis, etc)
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from waflib import Context, Task, Utils, Logs, Options, Errors, Node
|
from waflib import Build, Context, Task, Utils, Logs, Options, Errors, Node
|
||||||
from waflib.TaskGen import extension, taskgen_method
|
from waflib.TaskGen import extension, taskgen_method
|
||||||
from waflib.Configure import conf
|
from waflib.Configure import conf
|
||||||
|
|
||||||
@ -145,8 +145,15 @@ def init_vala_task(self):
|
|||||||
package_obj = self.bld.get_tgen_by_name(package)
|
package_obj = self.bld.get_tgen_by_name(package)
|
||||||
except Errors.WafError:
|
except Errors.WafError:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# in practice the other task is already processed
|
||||||
|
# but this makes it explicit
|
||||||
|
package_obj.post()
|
||||||
package_name = package_obj.target
|
package_name = package_obj.target
|
||||||
for task in package_obj.tasks:
|
for task in package_obj.tasks:
|
||||||
|
if isinstance(task, Build.inst):
|
||||||
|
# TODO are we not expecting just valatask here?
|
||||||
|
continue
|
||||||
for output in task.outputs:
|
for output in task.outputs:
|
||||||
if output.name == package_name + ".vapi":
|
if output.name == package_name + ".vapi":
|
||||||
valatask.set_run_after(task)
|
valatask.set_run_after(task)
|
||||||
@ -181,21 +188,15 @@ def init_vala_task(self):
|
|||||||
|
|
||||||
if self.is_lib and valatask.install_binding:
|
if self.is_lib and valatask.install_binding:
|
||||||
headers_list = [o for o in valatask.outputs if o.suffix() == ".h"]
|
headers_list = [o for o in valatask.outputs if o.suffix() == ".h"]
|
||||||
try:
|
if headers_list:
|
||||||
self.install_vheader.source = headers_list
|
|
||||||
except AttributeError:
|
|
||||||
self.install_vheader = self.add_install_files(install_to=valatask.header_path, install_from=headers_list)
|
self.install_vheader = self.add_install_files(install_to=valatask.header_path, install_from=headers_list)
|
||||||
|
|
||||||
vapi_list = [o for o in valatask.outputs if (o.suffix() in (".vapi", ".deps"))]
|
vapi_list = [o for o in valatask.outputs if (o.suffix() in (".vapi", ".deps"))]
|
||||||
try:
|
if vapi_list:
|
||||||
self.install_vapi.source = vapi_list
|
|
||||||
except AttributeError:
|
|
||||||
self.install_vapi = self.add_install_files(install_to=valatask.vapi_path, install_from=vapi_list)
|
self.install_vapi = self.add_install_files(install_to=valatask.vapi_path, install_from=vapi_list)
|
||||||
|
|
||||||
gir_list = [o for o in valatask.outputs if o.suffix() == '.gir']
|
gir_list = [o for o in valatask.outputs if o.suffix() == '.gir']
|
||||||
try:
|
if gir_list:
|
||||||
self.install_gir.source = gir_list
|
|
||||||
except AttributeError:
|
|
||||||
self.install_gir = self.add_install_files(
|
self.install_gir = self.add_install_files(
|
||||||
install_to=getattr(self, 'gir_path', '${DATAROOTDIR}/gir-1.0'), install_from=gir_list)
|
install_to=getattr(self, 'gir_path', '${DATAROOTDIR}/gir-1.0'), install_from=gir_list)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user