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

Contents of /trunk/paso/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: 1996 byte(s)
now automatically build unit tests as required based on dependencies
between unit tests and libraries

1 # Scons configuration file for paso
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 dodebug = 0
18 usegcc = 0
19 options = None
20
21 #
22 # import configuration variables passed in from
23 # calling SConscript (if any)
24
25 Import('*')
26
27 #
28 # retreive command-line arguments if any
29
30 if ARGUMENTS.get('libinstall',0):
31 libinstall = ARGUMENTS.get('libinstall',0)
32 Export(["libinstall"])
33
34 if ARGUMENTS.get('debug',0):
35 dodebug = 1
36
37 if ARGUMENTS.get('usegcc',0):
38 usegcc = 1
39
40 if ARGUMENTS.get('options',0):
41 options = ARGUMENTS.get('options',0)
42
43 #
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 # set and export library directories
61
62 libdir = Dir(str(esysroot) + '/paso/lib')
63 Export(["libdir"])
64 libdir2 = Dir(str(esysroot) + '/lib')
65 Export(["libdir2"])
66
67 #
68 # load and export configuration settings
69
70 options_dir = str(esysroot) + '/scons'
71 sys.path.append(options_dir)
72
73 if hostname=='ess':
74 from ess_options import *
75
76 if usegcc==1:
77 from gcc_options import *
78
79 if options!=None:
80 exec "from " + options + " import *"
81
82 if dodebug==1:
83 cc_flags=cc_flags_debug
84
85 Export(["python_path"])
86 Export(["boost_path"])
87 Export(["cc"])
88 Export(["cc_flags"])
89 Export(["ar_flags"])
90
91 #
92 # print out build configuration for this module
93
94 print "############################################"
95 print "Build configuration for module: paso"
96 print " dodebug: ", dodebug
97 print " usegcc: ", usegcc
98 print " cc: ", cc
99 print " platform: ", platform
100 print " hostname: ", hostname
101 print " libinstall: ", libinstall
102 print "############################################"
103
104 #
105 # call the SConscript to do the actual build
106
107 SConscript('src/SConscript', src_dir='src', build_dir='obj', duplicate=0)

  ViewVC Help
Powered by ViewVC 1.1.26