-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPSA_build.py
More file actions
executable file
·49 lines (42 loc) · 1.38 KB
/
PSA_build.py
File metadata and controls
executable file
·49 lines (42 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
class DIRS:
pass
import sys
import os
import shutil
sys.path.append(os.getcwd() + "/python")
import py_src.utils as utils
dir_mode = 0754
dirs = DIRS()
#dirs.proj_dir = os.getenv("SIMSITE3D_INSTALL_DIR")
dirs.proj_dir = "/soft/linux64/SimSite3D_v4.5"
if(dirs.proj_dir == None):
print >> sys.stderr, \
"\nUnable to get the environment variable $SIMSITE3D_INSTALL_DIR"
print >> sys.stderr, "Please set $SIMSITE3D_INSTALL_DIR to a valid path"
sys.exit(1)
# This directory can screw things up between machines
if(os.path.isdir("autom4te.cache")):
utils.system("/bin/rm -rf autom4te.cache")
print "initializing SimSite3D C/C++ install environment... "
# shouldn't always call flush but the commands won't go in order
sys.stdout.flush()
if(not utils.system("/usr/bin/aclocal")):
sys.exit(1)
if(not utils.system("/usr/bin/libtoolize --copy --force --automake")):
sys.exit(1)
if(not utils.system("/usr/bin/automake -a -c")):
sys.exit(1)
if(not utils.system("/usr/bin/autoconf")):
sys.exit(1)
print "configuring SimSite3D C/C++ install environment... "
sys.stdout.flush()
if(not utils.system("./configure --prefix=\"" + dirs.proj_dir + "\"")):
sys.exit(1)
print "building SimSite3D C/C++ executables... "
sys.stdout.flush()
if(not utils.system("/usr/bin/make")):
sys.exit(1)
cwd = os.getcwd()
os.chdir("python")
os.system("tools/boost-jam-3.1.17-1-linuxx86/bjam build")
os.chdir(cwd)