--- ray/build_utils/load_plat.py 2003/10/21 19:27:28 1.1 +++ ray/build_utils/load_plat.py 2003/10/27 10:35:41 1.2 @@ -13,20 +13,23 @@ def POSIX_setup(env): env['RAD_PROCESS'] = string.split('unix_process.c') -def read_plat(env, fn): +def read_plat(env, args, fn): cfig = ConfigParser.ConfigParser(env.Dictionary()) cfig.read(fn) + buildvars = [['CC'], # replace + ['CPPPATH','CPPFLAGS','CCFLAGS','LIBPATH','LINKFLAGS']] # append vars = [ - ['build', - ['CC'], # replace - ['CPPFLAGS', 'CCFLAGS', 'CPPPATH', 'LIBPATH']], # append ['install', ['RAD_BASEDIR', 'RAD_BINDIR', 'RAD_RLIBDIR', 'RAD_MANDIR'], []], ['code', ['RAD_SPEED'], - ['RAD_COMPAT', 'RAD_MLIB', 'RAD_PROCESS']], + ['RAD_COMPAT', 'RAD_MEMCOMPAT', 'RAD_MATHCOMPAT', 'RAD_ARGSCOMPAT', + 'RAD_MLIB', 'RAD_PROCESS']], ] + if args.get('RAD_DEBUG',0): + vars.insert(0, ['debug'] + buildvars) + else: vars.insert(0, ['build'] + buildvars) for section in vars: if cfig.has_section(section[0]): for p in section[1]: @@ -46,7 +49,7 @@ def read_plat(env, fn): env[k] = os.path.join(env['RAD_BASEDIR'],env[k]) -def load_plat(env, platform=None): +def load_plat(env, args, platform=None): if os.name == 'posix': POSIX_setup(env) if platform == None: # override @@ -58,19 +61,19 @@ def load_plat(env, platform=None): pfn = os.path.join(_platdir, p[:i] + '_custom.cfg') if os.path.isfile(pfn): print 'Reading configuration "%s"' % pfn - read_plat(env, pfn) + read_plat(env, args, pfn) return 1 pfn = os.path.join(_platdir, p[:i] + '.cfg') if os.path.isfile(pfn): print 'Reading configuration "%s"' % pfn - read_plat(env, pfn) + read_plat(env, args, pfn) return 1 if os.name == 'posix': pfn = os.path.join(_platdir, 'posix.cfg') if os.path.isfile(pfn): print 'Reading generic configuration "%s".' % pfn - read_plat(env, pfn) + read_plat(env, args, pfn) return 1 print 'Platform "%s/%s" not supported yet' % (os.name, sys.platform)