/[escript]/trunk/paso/SConstruct
ViewVC logotype

Annotation of /trunk/paso/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 309 - (hide annotations)
Mon Dec 5 01:59:58 2005 UTC (14 years, 5 months ago) by jgs
File size: 1921 byte(s)
now load default options - by default!

1 jgs 214 # Scons configuration file for paso
2    
3     import os
4 jgs 217 import sys
5 jgs 214
6     #
7     # ensure correct versions of python and scons
8    
9     EnsurePythonVersion(2,3)
10     EnsureSConsVersion(0,96)
11    
12     #
13     # set appropriate defaults for configuration variables
14    
15     esysroot = Dir('#..')
16 jgs 192 libinstall = None
17 jgs 214 dodebug = 0
18     usegcc = 0
19 jgs 246 options = None
20 jgs 190
21 jgs 214 #
22     # import configuration variables passed in from
23     # calling SConscript (if any)
24    
25 jgs 190 Import('*')
26    
27 jgs 214 #
28     # retreive command-line arguments if any
29 jgs 190
30 jgs 214 if ARGUMENTS.get('libinstall',0):
31     libinstall = ARGUMENTS.get('libinstall',0)
32 jgs 192 Export(["libinstall"])
33    
34 jgs 214 if ARGUMENTS.get('debug',0):
35     dodebug = 1
36    
37     if ARGUMENTS.get('usegcc',0):
38     usegcc = 1
39    
40 jgs 246 if ARGUMENTS.get('options',0):
41     options = ARGUMENTS.get('options',0)
42    
43 jgs 214 #
44     # determine platform
45    
46     env = Environment(ENV = os.environ)
47     platform = env['PLATFORM']
48    
49     #
50     # determine hostname
51    
52     hostname = os.environ['HOSTNAME']
53    
54     #
55     # export esysroot
56    
57     Export(["esysroot"])
58    
59     #
60 jgs 288 # set and export library directories
61 jgs 214
62 jgs 190 libdir = Dir(str(esysroot) + '/paso/lib')
63 jgs 187 Export(["libdir"])
64 jgs 288 libdir2 = Dir(str(esysroot) + '/lib')
65     Export(["libdir2"])
66 jgs 187
67 jgs 214 #
68     # load and export configuration settings
69    
70 jgs 216 options_dir = str(esysroot) + '/scons'
71     sys.path.append(options_dir)
72 jgs 191
73 jgs 309 from default_options import *
74    
75 jgs 224 if hostname=='ess':
76 jgs 216 from ess_options import *
77 jgs 214
78 jgs 241 if usegcc==1:
79     from gcc_options import *
80    
81 jgs 246 if options!=None:
82     exec "from " + options + " import *"
83    
84 jgs 224 if dodebug==1:
85     cc_flags=cc_flags_debug
86    
87 jgs 191 Export(["python_path"])
88     Export(["boost_path"])
89 jgs 223 Export(["cc"])
90 jgs 214 Export(["cc_flags"])
91     Export(["ar_flags"])
92 jgs 191
93 jgs 214 #
94     # print out build configuration for this module
95 jgs 191
96 jgs 214 print "Build configuration for module: paso"
97     print " dodebug: ", dodebug
98     print " usegcc: ", usegcc
99 jgs 223 print " cc: ", cc
100 jgs 214 print " platform: ", platform
101     print " hostname: ", hostname
102     print " libinstall: ", libinstall
103 jgs 191
104 jgs 214 #
105     # call the SConscript to do the actual build
106 jgs 199
107 jgs 187 SConscript('src/SConscript', src_dir='src', build_dir='obj', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26