root/trunk/libffado/admin/dbus.py

Revision 588, 0.9 kB (checked in by arnonym, 13 years ago)

refactor the dbus-builders into their own module...

Line 
1 #!/usr/bin/python
2
3 #
4 # xml translator
5 #
6
7 def dbusxx_xml2cpp_emitter(target, source, env):
8         env.Depends(target, "#/external/dbus/dbusxx-xml2cpp" )
9         return (target, source)
10
11 def dbusxx_xml2cpp_adaptor_action( target, source, env ):
12         env.Execute( "./external/dbus/dbusxx-xml2cpp %s --adaptor=%s" % ( source[0], target[0] ) )
13         return 0
14
15 def dbusxx_xml2cpp_proxy_action( target, source, env ):
16         env.Execute( "./external/dbus/dbusxx-xml2cpp %s --proxy=%s" % ( source[0], target[0] ) )
17         return 0
18
19 def generate( env, **kw ):
20         env['BUILDERS']['Xml2Cpp_Adaptor'] = env.Builder(action = dbusxx_xml2cpp_adaptor_action,
21                 emitter = dbusxx_xml2cpp_emitter,
22                 suffix = '.h', src_suffix = '.xml')
23         env['BUILDERS']['Xml2Cpp_Proxy'] = env.Builder(action = dbusxx_xml2cpp_proxy_action,
24                 emitter = dbusxx_xml2cpp_emitter,
25                 suffix = '.h', src_suffix = '.xml', single_source=True )
26
27 def exists( env ):
28         return 1
29
Note: See TracBrowser for help on using the browser.