6 from TaskGen
import taskgen
, before
, after
, feature
9 def add_dbus_file(self
, filename
, prefix
, mode
):
10 if not hasattr(self
, 'dbus_lst'):
12 self
.meths
.append('process_dbus')
13 self
.dbus_lst
.append([filename
, prefix
, mode
])
16 def process_dbus(self
):
17 for filename
, prefix
, mode
in getattr(self
, 'dbus_lst', []):
18 node
= self
.path
.find_resource(filename
)
21 raise Utils
.WafError('file not found ' + filename
)
23 tsk
= self
.create_task('dbus_binding_tool', node
, node
.change_ext('.h'))
25 tsk
.env
.DBUS_BINDING_TOOL_PREFIX
= prefix
26 tsk
.env
.DBUS_BINDING_TOOL_MODE
= mode
28 Task
.simple_task_type('dbus_binding_tool',
29 '${DBUS_BINDING_TOOL} --prefix=${DBUS_BINDING_TOOL_PREFIX} --mode=${DBUS_BINDING_TOOL_MODE} --output=${TGT} ${SRC}',
30 color
='BLUE', before
='cc')
33 dbus_binding_tool
= conf
.find_program('dbus-binding-tool', var
='DBUS_BINDING_TOOL')