ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/build_utils/load_plat.py
(Generate patch)

Comparing ray/build_utils/load_plat.py (file contents):
Revision 1.1 by schorsch, Tue Oct 21 19:27:28 2003 UTC vs.
Revision 1.3 by schorsch, Thu Oct 21 15:47:12 2004 UTC

# Line 13 | Line 13 | def POSIX_setup(env):
13      env['RAD_PROCESS'] = string.split('unix_process.c')
14  
15  
16 < def read_plat(env, fn):
16 > def read_plat(env, args, fn):
17          cfig = ConfigParser.ConfigParser(env.Dictionary())
18          cfig.read(fn)
19 +        buildvars = [['CC'], # replace
20 +                        ['CPPPATH', 'CPPDEFINES', 'CPPFLAGS', 'CCFLAGS',
21 +                        'LIBPATH', 'LINKFLAGS']] # append
22          vars = [
20                ['build',
21                        ['CC'], # replace
22                        ['CPPFLAGS', 'CCFLAGS', 'CPPPATH', 'LIBPATH']], # append
23                  ['install',
24                          ['RAD_BASEDIR', 'RAD_BINDIR', 'RAD_RLIBDIR', 'RAD_MANDIR'],
25                          []],
26                  ['code',
27                          ['RAD_SPEED'],
28 <                        ['RAD_COMPAT', 'RAD_MLIB', 'RAD_PROCESS']],
28 >                        ['RAD_COMPAT', 'RAD_MEMCOMPAT', 'RAD_MATHCOMPAT', 'RAD_ARGSCOMPAT',
29 >                        'RAD_MLIB', 'RAD_PROCESS']],
30          ]
31 +        if args.get('RAD_DEBUG',0):
32 +                vars.insert(0, ['debug'] + buildvars)
33 +        else: vars.insert(0, ['build'] + buildvars)
34          for section in vars:
35                  if cfig.has_section(section[0]):
36                          for p in section[1]:
# Line 46 | Line 50 | def read_plat(env, fn):
50                          env[k] = os.path.join(env['RAD_BASEDIR'],env[k])
51  
52  
53 < def load_plat(env, platform=None):
53 > def load_plat(env, args, platform=None):
54          if os.name == 'posix':
55                  POSIX_setup(env)
56          if platform == None: # override
# Line 58 | Line 62 | def load_plat(env, platform=None):
62                  pfn = os.path.join(_platdir, p[:i] + '_custom.cfg')
63                  if os.path.isfile(pfn):
64                          print 'Reading configuration "%s"' % pfn
65 <                        read_plat(env, pfn)
65 >                        read_plat(env, args, pfn)
66                          return 1
67                  pfn = os.path.join(_platdir, p[:i] + '.cfg')
68                  if os.path.isfile(pfn):
69                          print 'Reading configuration "%s"' % pfn
70 <                        read_plat(env, pfn)
70 >                        read_plat(env, args, pfn)
71                          return 1
72                  
73          if os.name == 'posix':
74                  pfn = os.path.join(_platdir, 'posix.cfg')
75                  if os.path.isfile(pfn):
76                          print 'Reading generic configuration "%s".' % pfn
77 <                        read_plat(env, pfn)
77 >                        read_plat(env, args, pfn)
78                          return 1
79  
80          print 'Platform "%s/%s" not supported yet' % (os.name, sys.platform)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines