s4:auth/gensec_gssapi: remember the expire time
[Samba/gebeck_regimport.git] / buildtools / wafadmin / Tools / dbus.py
blob317999939213f08ce61428cf8424c875fe77c890
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # Ali Sabil, 2007
5 import Task, Utils
6 from TaskGen import taskgen, before, after, feature
8 @taskgen
9 def add_dbus_file(self, filename, prefix, mode):
10 if not hasattr(self, 'dbus_lst'):
11 self.dbus_lst = []
12 self.meths.append('process_dbus')
13 self.dbus_lst.append([filename, prefix, mode])
15 @before('apply_core')
16 def process_dbus(self):
17 for filename, prefix, mode in getattr(self, 'dbus_lst', []):
18 node = self.path.find_resource(filename)
20 if not node:
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')
32 def detect(conf):
33 dbus_binding_tool = conf.find_program('dbus-binding-tool', var='DBUS_BINDING_TOOL')