Changeset 1661
- Timestamp:
- 09/13/09 12:36:26 (14 years ago)
- Files:
-
- branches/libffado-2.0/SConstruct (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/libffado-2.0/SConstruct
r1565 r1661 32 32 import imp 33 33 34 build_dir = ARGUMENTS.get('BUILDDIR', "")35 if build_dir:36 build_base=build_dir+'/'37 if not os.path.isdir( build_base ):38 os.makedirs( build_base )39 print "Building into: " + build_base40 else:41 build_base=''42 43 34 if not os.path.isdir( "cache" ): 44 35 os.makedirs( "cache" ) 45 36 46 opts = Options( "cache/"+build_base+"options.cache" ) 47 48 # 49 # If this is just to display a help-text for the variable used via ARGUMENTS, then its wrong... 50 opts.Add( "BUILDDIR", "Path to place the built files in", "") 37 opts = Options( "cache/options.cache" ) 51 38 52 39 opts.AddOptions( … … 128 115 129 116 # make sure the necessary dirs exist 130 if not os.path.isdir( "cache /" + build_base):131 os.makedirs( "cache /" + build_base)117 if not os.path.isdir( "cache" ): 118 os.makedirs( "cache" ) 132 119 if not os.path.isdir( 'cache/objects' ): 133 120 os.makedirs( 'cache/objects' ) … … 135 122 CacheDir( 'cache/objects' ) 136 123 137 opts.Save( 'cache/ ' + build_base + "options.cache", env )124 opts.Save( 'cache/options.cache', env ) 138 125 139 126 def ConfigGuess( context ): … … 190 177 conf = Configure( env, 191 178 custom_tests = tests, 192 conf_dir = "cache/" + build_base,193 log_file = "cache/" + build_base + 'config.log' )179 conf_dir = "cache/", 180 log_file = 'cache/config.log' ) 194 181 195 182 if env['SERIALIZE_USE_EXPAT']: … … 330 317 env['BUILD_STATIC_LIB'] = True 331 318 332 if build_base: 333 env['build_base']="#/"+build_base 334 else: 335 env['build_base']="#/" 319 env['build_base']="#/" 336 320 337 321 # … … 520 504 521 505 env.Depends( "config.h", "SConstruct" ) 522 env.Depends( "config.h", 'cache/ ' + build_base + "options.cache")506 env.Depends( "config.h", 'cache/options.cache' ) 523 507 524 508 # update config.h whenever the SVN revision changes … … 535 519 subdirs.append('tests') 536 520 537 if build_base: 538 env.SConscript( dirs=subdirs, exports="env", build_dir=build_base+subdir ) 539 else: 540 env.SConscript( dirs=subdirs, exports="env" ) 521 env.SConscript( dirs=subdirs, exports="env" ) 541 522 542 523 # By default only src is built but all is cleaned