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

Contents of /trunk/esysUtils/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 241 - (show annotations)
Mon Nov 28 06:14:47 2005 UTC (13 years, 4 months ago) by jgs
File size: 1652 byte(s)
if usegcc=1 is set on command line, load compiler options
fropm scons/gcc_options.py

1 # Scons configuration file for esysUtils
2
3 import os
4 import sys
5
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 dodebug = 0
17 usegcc = 0
18
19 #
20 # import configuration variables passed in from
21 # calling SConscript (if any)
22
23 Import('*')
24
25 #
26 # retreive command-line arguments if any
27
28 if ARGUMENTS.get('debug',0):
29 dodebug = 1
30
31 if ARGUMENTS.get('usegcc',0):
32 usegcc = 1
33
34 #
35 # determine platform
36
37 env = Environment(ENV = os.environ)
38 platform = env['PLATFORM']
39
40 #
41 # determine hostname
42
43 hostname = os.environ['HOSTNAME']
44
45 #
46 # export esysroot
47
48 Export(["esysroot"])
49
50 #
51 # set and export library directory
52
53 libdir = Dir(str(esysroot) + '/esysUtils/lib')
54 Export(["libdir"])
55
56 #
57 # load and export configuration settings
58
59 options_dir = str(esysroot) + '/scons'
60 sys.path.append(options_dir)
61
62 if hostname=='ess':
63 from ess_options import *
64
65 if usegcc==1:
66 from gcc_options import *
67
68 if dodebug==1:
69 cxx_flags=cxx_flags_debug
70
71 Export(["python_path"])
72 Export(["boost_path"])
73 Export(["cxx"])
74 Export(["cxx_flags"])
75 Export(["ar_flags"])
76
77 #
78 # print out build configuration for this module
79
80 print "############################################"
81 print "Build configuration for module: esysUtils"
82 print " dodebug: ", dodebug
83 print " usegcc: ", usegcc
84 print " cxx: ", cxx
85 print " platform: ", platform
86 print " hostname: ", hostname
87 print "############################################"
88
89 #
90 # call the SConscript to do the actual build
91
92 SConscript('src/SConscript', src_dir='src', build_dir='obj', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26