Changeset 588

Show
Ignore:
Timestamp:
08/29/07 08:18:06 (15 years ago)
Author:
arnonym
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/external/dbus/SConscript

    r576 r588  
    99Import( 'externalenv' ) 
    1010#dbus_env = env.Copy() 
    11 #buildenv={} 
    12 #if os.environ.has_key('PATH'): 
    13 #       buildenv['PATH']=os.environ['PATH'] 
    14 #else: 
    15 #       buildenv['PATH']='' 
    1611 
    17 #if os.environ.has_key('PKG_CONFIG_PATH'): 
    18 #       buildenv['PKG_CONFIG_PATH']=os.environ['PKG_CONFIG_PATH'] 
    19 #else: 
    20 #       buildenv['PKG_CONFIG_PATH']='' 
    21  
    22 dbus_env = externalenv.Copy() #Environment( ENV = buildenv ) 
    23  
    24 #CacheDir( 'cache/objects' ) 
     12dbus_env = externalenv.Copy() 
    2513 
    2614if dbus_env.has_key('DBUS1_FLAGS'): 
     
    8371dbusxx_xml2cpp = tools_env.Program('dbusxx-xml2cpp', xml2cpp_sources) 
    8472 
    85 # 
    86 # xml translator 
    87 # 
    88  
    89 def dbusxx_xml2cpp_emitter(target, source, env): 
    90     dbus_env.Depends(target, dbusxx_xml2cpp) 
    91     return (target, source) 
    92  
    93 dbusxx_xml2cpp_adaptor_builder = Builder(action = dbusxx_xml2cpp[0].abspath + ' $SOURCE --adaptor=$TARGET', 
    94     emitter = dbusxx_xml2cpp_emitter, 
    95     suffix = '.h', src_suffix = '.xml') 
    96  
    97 dbusxx_xml2cpp_proxy_builder = Builder(action = dbusxx_xml2cpp[0].abspath + ' $SOURCE --proxy=$TARGET', 
    98     emitter = dbusxx_xml2cpp_emitter, 
    99     suffix = '.h', src_suffix = '.xml') 
    100  
    101 Export('dbusxx_xml2cpp_adaptor_builder') 
    102 Export('dbusxx_xml2cpp_proxy_builder') 
  • trunk/libffado/SConstruct

    r587 r588  
    5656        buildenv['PKG_CONFIG_PATH']='' 
    5757 
    58 env = Environment( tools=['default','scanreplace','pyuic'], toolpath=['admin'], ENV = buildenv, options=opts ) 
     58env = Environment( tools=['default','scanreplace','pyuic','dbus'], toolpath=['admin'], ENV = buildenv, options=opts ) 
    5959 
    6060Help( """ 
     
    232232env.Alias( "install", env.Install( env['libdir'] + '/pkgconfig', pkgconfig ) ) 
    233233 
    234 # build helper tools first 
    235 subdirs=['external'] 
     234subdirs=['external','src','libffado','tests','support'] 
    236235if build_base: 
    237236        env.SConscript( dirs=subdirs, exports="env", build_dir=build_base+subdir ) 
     
    239238        env.SConscript( dirs=subdirs, exports="env" ) 
    240239 
     240 
     241# By default only src is built but all is cleaned 
    241242if not env.GetOption('clean'): 
    242243    Default( 'external' ) 
    243  
    244 Import( 'dbusxx_xml2cpp_adaptor_builder' ) 
    245 env.Append(BUILDERS = {'XML2CPP_ADAPTOR' : dbusxx_xml2cpp_adaptor_builder}) 
    246  
    247 Import( 'dbusxx_xml2cpp_proxy_builder' ) 
    248 env.Append(BUILDERS = {'XML2CPP_PROXY' : dbusxx_xml2cpp_proxy_builder}) 
    249  
    250 # now build our own stuff, which can use the tools defined above 
    251 subdirs=['src','libffado','tests','support'] 
    252 if build_base: 
    253         env.SConscript( dirs=subdirs, exports="env", build_dir=build_base+subdir ) 
    254 else: 
    255         env.SConscript( dirs=subdirs, exports="env" ) 
    256  
    257  
    258 # By default only src is built but all is cleaned 
    259 if not env.GetOption('clean'): 
    260244    Default( 'src' ) 
    261245    if env['BUILD_TESTS']: 
    262246        Default( 'tests' ) 
     247    # Cachedir has to be fixed... 
    263248    #env.Alias( "install", env["cachedir"], os.makedirs( env["cachedir"] ) ) 
    264     env.Alias( "install", env.Install( env["cachedir"], "" ) ) #os.makedirs( env["cachedir"] ) ) 
     249    #env.Alias( "install", env.Install( env["cachedir"], "" ) ) #os.makedirs( env["cachedir"] ) ) 
  • trunk/libffado/tests/SConscript

    r586 r588  
    2121env.Program( target="test-sytmonitor", source = env.Split( "test-sytmonitor.cpp SytMonitor.cpp" ) ) 
    2222 
    23 env.XML2CPP_PROXY('controlclient-glue.h', 'control-interface.xml') 
     23env.Xml2Cpp_Proxy('controlclient-glue.h', 'control-interface.xml') 
    2424env.Program( target="test-dbus", source = env.Split( "test-dbus.cpp controlclient.cpp" ) ) 
    2525 
    26 env.XML2CPP_ADAPTOR('controlserver-glue.h', 'control-interface.xml') 
     26env.Xml2Cpp_Adaptor('controlserver-glue.h', 'control-interface.xml') 
    2727env.Program( target="test-dbus-server", source = env.Split( "test-dbus-server.cpp controlserver.cpp" ) ) 
    2828env.Program( target="test-ffado", source = env.Split( "test-ffado.cpp controlserver.cpp" ) )