Index: /trunk/libffado/SConstruct =================================================================== --- /trunk/libffado/SConstruct (revision 570) +++ /trunk/libffado/SConstruct (revision 571) @@ -84,6 +84,19 @@ opts.Save( 'cache/' + build_base + "options.cache", env ) +# +# Check for apps... +# +def CheckForApp( context, app ): + context.Message( "Checking if '%s' executes... " % app ) + ret = context.TryAction( app )[0] + context.Result( ret ) + return ret + + if not env.GetOption('clean'): - conf = Configure( env, custom_tests={ 'CheckForPKGConfig' : CheckForPKGConfig, 'CheckForPKG' : CheckForPKG }, conf_dir="cache/" + build_base, log_file="cache/" + build_base + 'config.log' ) + conf = Configure( env, + custom_tests={ 'CheckForPKGConfig' : CheckForPKGConfig, 'CheckForPKG' : CheckForPKG, 'CheckForApp' : CheckForApp }, + conf_dir="cache/" + build_base, + log_file="cache/" + build_base + 'config.log' ) if not conf.CheckHeader( "stdio.h" ): @@ -110,9 +123,15 @@ Exit( 1 ) + # + # Checking wether "which pyuic" executes is clearly wrong. Nonetheless here + # on my system it seems to be the right thing, as checking for pyuic alone + # returns false. (Both pyuic and which are installed in the same dir.) + # - Strange :-/ + env['HAVE_PYUIC'] = conf.CheckForApp( 'which pyuic' ) + env = conf.Finish() - if env['DEBUG']: - print "Doing a debug build" + print "Doing a DEBUG build" # -Werror could be added to, which would force the devs to really remove all the warnings :-) env.AppendUnique( CCFLAGS=["-DDEBUG","-Wall","-g"] ) Index: /trunk/libffado/support/mixer/SConscript =================================================================== --- /trunk/libffado/support/mixer/SConscript (revision 561) +++ /trunk/libffado/support/mixer/SConscript (revision 571) @@ -3,13 +3,10 @@ Import( 'env' ) -env = env.Copy() +if env['HAVE_PYUIC']: -#env.AppendUnique( CPPPATH=["#/src"] ) -#env.AppendUnique( LIBPATH=["#/src"] ) -#env.AppendUnique( LIBS=["ffado"] ) + env = env.Copy() -for app in ["mixer_phase24.ui","mixer_phase88.ui"]: - #env.PyUIC( target=app.replace(".","")+".py", source=app ) - env.Command( target=app.replace(".","")+".py", source=app, action="pyuic $SOURCE > $TARGET" ) + for app in ["mixer_phase24.ui","mixer_phase88.ui"]: + env.Command( target=app.replace(".","")+".py", source=app, action="pyuic $SOURCE > $TARGET" )