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

Annotation of /trunk/bruce/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 224 - (hide annotations)
Fri Nov 25 00:33:27 2005 UTC (14 years ago) by jgs
File size: 1748 byte(s)
implement switching of debug compiler options based on command line flag 'debug'
1 jgs 214 # Scons configuration file for bruce
2    
3     import os
4 jgs 216 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 190
20 jgs 214 #
21     # import configuration variables passed in from
22     # calling SConscript (if any)
23    
24 jgs 190 Import('*')
25    
26 jgs 214 #
27     # retreive command-line arguments if any
28 jgs 190
29 jgs 214 if ARGUMENTS.get('libinstall',0):
30     libinstall = ARGUMENTS.get('libinstall',0)
31 jgs 192 Export(["libinstall"])
32    
33 jgs 214 if ARGUMENTS.get('debug',0):
34     dodebug = 1
35    
36     if ARGUMENTS.get('usegcc',0):
37     usegcc = 1
38    
39     #
40     # determine platform
41    
42     env = Environment(ENV = os.environ)
43     platform = env['PLATFORM']
44    
45     #
46     # determine hostname
47    
48     hostname = os.environ['HOSTNAME']
49    
50     #
51     # export esysroot
52    
53     Export(["esysroot"])
54    
55     #
56     # set and export library directory
57    
58 jgs 190 libdir = Dir(str(esysroot) + '/bruce/lib')
59 jgs 176 Export(["libdir"])
60    
61 jgs 214 #
62     # load and export configuration settings
63    
64 jgs 216 options_dir = str(esysroot) + '/scons'
65     sys.path.append(options_dir)
66 jgs 191
67 jgs 224 if hostname=='ess':
68 jgs 216 from ess_options import *
69 jgs 214
70 jgs 224 if dodebug==1:
71     cxx_flags=cxx_flags_debug
72    
73 jgs 191 Export(["python_path"])
74     Export(["boost_path"])
75 jgs 223 Export(["cxx"])
76 jgs 214 Export(["cxx_flags"])
77 jgs 191
78 jgs 214 #
79     # print out build configuration for this module
80 jgs 191
81 jgs 214 print "############################################"
82     print "Build configuration for module: bruce"
83     print " dodebug: ", dodebug
84     print " usegcc: ", usegcc
85 jgs 223 print " cxx: ", cxx
86 jgs 214 print " platform: ", platform
87     print " hostname: ", hostname
88     print " libinstall: ", libinstall
89     print "############################################"
90 jgs 191
91 jgs 214 #
92     # call the SConscript to do the actual build
93    
94 jgs 176 SConscript('src/Bruce/SConscript', src_dir='src/Bruce', build_dir='obj', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26