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

Contents of /trunk/bruce/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log


Revision 288 - (show annotations)
Fri Dec 2 01:55:04 2005 UTC (17 years, 3 months ago) by jgs
File size: 2594 byte(s)
now automatically build unit tests as required based on dependencies
between unit tests and libraries

1 # Scons configuration file for bruce
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 libinstall = None
17 pyinstall = None
18 dodebug = 0
19 usegcc = 0
20 options = None
21
22 #
23 # import configuration variables passed in from
24 # calling SConscript (if any)
25
26 Import('*')
27
28 #
29 # retreive command-line arguments if any
30
31 if ARGUMENTS.get('libinstall',0):
32 libinstall = ARGUMENTS.get('libinstall',0)
33 Export(["libinstall"])
34
35 if ARGUMENTS.get('pyinstall',0):
36 pyinstall = ARGUMENTS.get('pyinstall',0)
37 Export(["pyinstall"])
38
39 if ARGUMENTS.get('debug',0):
40 dodebug = 1
41
42 if ARGUMENTS.get('usegcc',0):
43 usegcc = 1
44
45 if ARGUMENTS.get('options',0):
46 options = ARGUMENTS.get('options',0)
47
48 #
49 # determine platform
50
51 env = Environment(ENV = os.environ)
52 platform = env['PLATFORM']
53
54 #
55 # determine hostname
56
57 hostname = os.environ['HOSTNAME']
58
59 #
60 # export esysroot
61
62 Export(["esysroot"])
63
64 #
65 # set and export library directories
66
67 libdir = Dir(str(esysroot) + '/bruce/lib')
68 Export(["libdir"])
69 libdir2 = Dir(str(esysroot) + '/lib')
70 Export(["libdir2"])
71
72 #
73 # set and export python directories
74
75 pydir = Dir(str(esysroot) + '/bruce/lib/py_src')
76 Export(["pydir"])
77 pydir2 = Dir(str(esysroot) + '/esys/bruce')
78 Export(["pydir2"])
79
80 #
81 # load and export configuration settings
82
83 options_dir = str(esysroot) + '/scons'
84 sys.path.append(options_dir)
85
86 if hostname=='ess':
87 from ess_options import *
88
89 if usegcc==1:
90 from gcc_options import *
91
92 if options!=None:
93 exec "from " + options + " import *"
94
95 if dodebug==1:
96 cxx_flags=cxx_flags_debug
97
98 Export(["python_path"])
99 Export(["boost_path"])
100 Export(["cxx"])
101 Export(["cxx_flags"])
102 Export(["boost_lib_path"])
103 Export(["boost_lib"])
104 Export(["sys_libs"])
105
106 #
107 # print out build configuration for this module
108
109 print "############################################"
110 print "Build configuration for module: bruce"
111 print " dodebug: ", dodebug
112 print " usegcc: ", usegcc
113 print " cxx: ", cxx
114 print " platform: ", platform
115 print " hostname: ", hostname
116 print " libinstall: ", libinstall
117 print " pyinstall: ", pyinstall
118 print "############################################"
119
120 #
121 # call the SConscript to do the actual build
122
123 SConscript(dirs=['src/Bruce'], build_dir='obj/Bruce', duplicate=0)
124 SConscript(dirs=['py_src'], build_dir='obj/py_src', duplicate=0)
125 SConscript(dirs=['test/Bruce'], build_dir='obj/test/Bruce', duplicate=0)
126 SConscript(dirs=['test/BruceFactory'], build_dir='obj/test/BruceFactory', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26