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.6 by schorsch, Wed Sep 14 09:28:35 2005 UTC vs.
Revision 1.7 by schorsch, Mon Sep 19 11:30:09 2005 UTC

# Line 8 | Line 8 | import ConfigParser
8   _platdir = 'platform'
9  
10  
11 def POSIX_setup(env):
12    # common stuff for all posix systems
13    env['RAD_PROCESS'] = string.split('unix_process.c')
14
15
11   def read_plat(env, args, fn):
12          cfig = ConfigParser.ConfigParser(env.Dictionary())
13          cfig.read(fn)
# Line 24 | Line 19 | def read_plat(env, args, fn):
19                          ['RAD_BASEDIR', 'RAD_BINDIR', 'RAD_RLIBDIR', 'RAD_MANDIR'],
20                          []],
21                  ['code',
22 <                        ['RAD_SPEED'],
23 <                        ['RAD_COMPAT', 'RAD_MEMCOMPAT', 'RAD_MATHCOMPAT', 'RAD_ARGSCOMPAT',
24 <                        'RAD_MLIB', 'RAD_SOCKETLIB', 'RAD_PROCESS']],
22 >                        [], # replace
23 >                        [   # append
24 >                        'RAD_COMPAT',    # currently obsolete
25 >                        'RAD_MATHCOMPAT', # erf.c floating point error function
26 >                        'RAD_ARGSCOMPAT', # fixargv0.c for Windows
27 >                        'RAD_NETCOMPAT',  # [win_]netproc.c for ranimate
28 >                        'RAD_MLIB',       # usually 'm', or any fastlib available
29 >                        'RAD_SOCKETLIB',  # ws_2_32 on Windows (VC links it automatically)
30 >                        'RAD_PROCESS']],  # our process abstraction and win_popen()
31          ]
32          if args.get('RAD_DEBUG',0):
33                  vars.insert(0, ['debug'] + buildvars)
34          else: vars.insert(0, ['build'] + buildvars)
35          for section in vars:
36                  if cfig.has_section(section[0]):
37 <                        for p in section[1]:
37 >                        for p in section[1]: # single items to replace
38                                  try: v = cfig.get(section[0], p)
39                                  except ConfigParser.NoOptionError: continue
40                                  env[p] = v
41                                  #print '%s: %s' % (p, env[p])
42 <                        for p in section[2]:
42 >                        for p in section[2]: # multiple items to append
43                                  try: v = cfig.get(section[0], p)
44                                  except ConfigParser.NoOptionError: continue
45                                  apply(env.Append,[],{p:string.split(v)})
# Line 51 | Line 52 | def read_plat(env, args, fn):
52  
53  
54   def load_plat(env, args, platform=None):
54        if os.name == 'posix':
55                POSIX_setup(env)
55          if platform == None: # override
56                  p = sys.platform
57          else: p = platform
58          if p == 'win32' and 'gcc' in env['TOOLS']:
59 +                # we don't really want to know this here...
60                  p = 'mingw'
61          pl = []
62          print 'Detected platform "%s" (%s).' % (sys.platform, os.name)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines