ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/build_utils/install.py
Revision: 1.2
Committed: Thu Oct 21 15:47:12 2004 UTC (18 years, 11 months ago) by schorsch
Content type: text/x-python
Branch: MAIN
CVS Tags: rad3R7P2, rad5R0, rad4R2P2, rad4R2P1, rad3R7P1, rad4R2, rad4R1, rad4R0, rad3R6, rad3R6P1, rad3R8, rad3R9
Changes since 1.1: +7 -0 lines
Log Message:
SCons build simplifications.

File Contents

# Content
1
2 import os
3
4 def install_dir(env, il, sbase, tbase, dir):
5 fulldir = os.path.join(sbase, dir)
6 l = os.listdir(fulldir)
7 instdir = os.path.join(tbase, dir)
8 for item in l:
9 if item[0] == '.' or item[-1] in '%~' or item == 'CVS':
10 continue
11 elif os.path.isdir(os.path.join(fulldir, item)):
12 install_dir(env, il, sbase, tbase, os.path.join(dir, item))
13 else:
14 inst = env.Install(instdir, os.path.join(fulldir, item))
15 il.append(inst)
16
17 def install_rlibfiles(env):
18 buildrlib = env['RAD_BUILDRLIB']
19 if buildrlib[0] == '#':
20 buildrlib = buildrlib[1:]
21 sbase = os.path.join(os.getcwd(), buildrlib)
22 il = []
23 install_dir(env, il, sbase, env['RAD_RLIBDIR'], '')
24 env.Append(RAD_RLIBINSTALL=il)
25
26
27 def install_manfiles(env):
28 buildman = env['RAD_BUILDMAN']
29 if buildman[0] == '#':
30 buildman = buildman[1:]
31 sbase = os.path.join(os.getcwd(), buildman)
32 il = []
33 install_dir(env, il, sbase, env['RAD_MANDIR'], '')
34 env.Append(RAD_MANINSTALL=il)
35
36
37 def install_cshscript(target, source, env):
38 for t,s in map(None,target,source):
39 sf = open(str(s), 'r')
40 tf = open(str(t), 'w')
41 tf.write(sf.read())
42 os.chmod(str(t), 00755)
43