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

Comparing ray/SConstruct (file contents):
Revision 1.1 by schorsch, Tue Oct 21 19:27:28 2003 UTC vs.
Revision 1.6 by schorsch, Thu Feb 10 16:42:04 2005 UTC

# Line 1 | Line 1
1  
2 # Notes to people who come after:
3 #
4 # In general, only use '/' as a path separator in *nix-specific code, use
5 # os.path.join() for everythign else
6
2   import os
3   import sys
4   import string
5  
6   OPTFILE = 'rayopts.py'
7 <
7 > SourceSignatures('timestamp')
8   def set_opts(env):
9      # XXX add some caching
10      opts = Options(OPTFILE, ARGUMENTS)
# Line 17 | Line 12 | def set_opts(env):
12      opts.Add('RAD_BINDIR',  'Install executables here',   env['RAD_BINDIR'])
13      opts.Add('RAD_RLIBDIR', 'Install support files here', env['RAD_RLIBDIR'])
14      opts.Add('RAD_MANDIR',  'Install man pages here',     env['RAD_MANDIR'])
15 +    opts.Add('RAD_DEBUG',   'Build a debug version',  0)
16      opts.Update(env)
17      opts.Save(OPTFILE, env)
18      Help(opts.GenerateHelpText(env, sort=cmp))
# Line 30 | Line 26 | def allplats_setup(env):
26      from build_utils import find_libs
27      find_libs.find_x11(env)
28      find_libs.find_gl(env) # OpenGL
33    #find_libs.find_pixar(env) # PIXAR_LIB for src/px/ra_pixar.c
29  
30   def post_common_setup(env):
31      env.Append(CPPPATH = [os.path.join('#src', 'common')])
# Line 49 | Line 44 | def shareinstall_setup(env):
44   # Set up build environment
45   env = Environment()
46  
47 + if os.name == 'posix':
48 +        from build_utils import install
49 +        csh_b = Builder(action = install.install_cshscript,
50 +                        suffix = '', src_suffix = '.csh')
51 +        env.Append(BUILDERS={'InstallCsh': csh_b})
52 +
53   # configure platform-specific stuff
54   from build_utils import load_plat
55 < load_plat.load_plat(env, platform=None)
55 > load_plat.load_plat(env, ARGUMENTS, platform=None)
56  
57   # override options
58   set_opts(env)
# Line 64 | Line 65 | if not env['SKIP'] and not '-c' in sys.argv:
65   # fill in generic config
66   allplats_setup(env)
67  
68 +                
69 +
70   # Bring in all the actual things to build
71   Export('env')
72   SConscript(os.path.join('src', 'common', 'SConscript'))
73   post_common_setup(env)
74   for d in Split('meta cv gen ot rt px hd util cal'):
75 +    print d
76      SConscript(os.path.join('src', d, 'SConscript'))
77  
78   if string.find(string.join(sys.argv[1:]), 'install') > -1:
79          shareinstall_setup(env)
80  
81 + Default('.')
82 +
83   # virtual targets
84 < # RAD_XXXINSTALL are filled in by the local scripts
85 < env.Alias('bininstall',  env.get('RAD_BININSTALL', []))
86 < env.Alias('rlibinstall', env.get('RAD_RLIBINSTALL',[]))
81 < env.Alias('maninstall',  env.get('RAD_MANINSTALL', []))
84 > env.Alias('bininstall',  '$RAD_BINDIR')
85 > env.Alias('rlibinstall', '$RAD_RLIBDIR')
86 > env.Alias('maninstall',  '$RAD_MANDIR')
87  
88   env.Alias('build',   ['#bin'])
89   env.Alias('test',    ['#src/test'])
90   env.Alias('install', ['bininstall', 'rlibinstall', 'maninstall'])
86
87 # Further virtual targets are defined locally:
88
89 # meta_special -> mt1601 okimate imagew mt160 mx80 impress aed5
90 #                 tcurve tscat tbar mtext libt4014.a plotout t4014
91 # meta_special_install
92
93 # px_special   -> ra_im, t4027, paintjet, mt160t, greyscale, colorscale, d48c
94 # px_special_install
95
96 # util_special -> scanner, makedist
97 # util_special_install
91  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines