Changeset 571

Show
Ignore:
Timestamp:
08/25/07 12:14:30 (15 years ago)
Author:
arnonym
Message:

Add a first check for pyuic and compile the mixer ui's only if it was successful.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/SConstruct

    r570 r571  
    8484opts.Save( 'cache/' + build_base + "options.cache", env ) 
    8585 
     86# 
     87# Check for apps... 
     88# 
     89def CheckForApp( context, app ): 
     90        context.Message( "Checking if '%s' executes... " % app ) 
     91        ret = context.TryAction( app )[0] 
     92        context.Result( ret ) 
     93        return ret 
     94 
     95 
    8696if not env.GetOption('clean'): 
    87         conf = Configure( env, custom_tests={ 'CheckForPKGConfig' : CheckForPKGConfig, 'CheckForPKG' : CheckForPKG }, conf_dir="cache/" + build_base, log_file="cache/" + build_base + 'config.log' ) 
     97        conf = Configure( env, 
     98                custom_tests={ 'CheckForPKGConfig' : CheckForPKGConfig, 'CheckForPKG' : CheckForPKG, 'CheckForApp' : CheckForApp }, 
     99                conf_dir="cache/" + build_base, 
     100                log_file="cache/" + build_base + 'config.log' ) 
    88101 
    89102        if not conf.CheckHeader( "stdio.h" ): 
     
    110123                Exit( 1 ) 
    111124 
     125        # 
     126        # Checking wether "which pyuic" executes is clearly wrong. Nonetheless here 
     127        # on my system it seems to be the right thing, as checking for pyuic alone 
     128        # returns false. (Both pyuic and which are installed in the same dir.) 
     129        # - Strange :-/ 
     130        env['HAVE_PYUIC'] = conf.CheckForApp( 'which pyuic' ) 
     131 
    112132        env = conf.Finish() 
    113133 
    114  
    115134if env['DEBUG']: 
    116         print "Doing a debug build" 
     135        print "Doing a DEBUG build" 
    117136        # -Werror could be added to, which would force the devs to really remove all the warnings :-) 
    118137        env.AppendUnique( CCFLAGS=["-DDEBUG","-Wall","-g"] ) 
  • trunk/libffado/support/mixer/SConscript

    r561 r571  
    33Import( 'env' ) 
    44 
    5 env = env.Copy() 
     5if env['HAVE_PYUIC']: 
    66 
    7 #env.AppendUnique( CPPPATH=["#/src"] ) 
    8 #env.AppendUnique( LIBPATH=["#/src"] ) 
    9 #env.AppendUnique( LIBS=["ffado"] ) 
     7        env = env.Copy() 
    108 
    11 for app in ["mixer_phase24.ui","mixer_phase88.ui"]: 
    12         #env.PyUIC( target=app.replace(".","")+".py", source=app ) 
    13         env.Command( target=app.replace(".","")+".py", source=app, action="pyuic $SOURCE > $TARGET" ) 
     9        for app in ["mixer_phase24.ui","mixer_phase88.ui"]: 
     10                env.Command( target=app.replace(".","")+".py", source=app, action="pyuic $SOURCE > $TARGET" ) 
    1411 
    1512