-
Notifications
You must be signed in to change notification settings - Fork 1
/
tamarin_build.py
94 lines (61 loc) · 2.2 KB
/
tamarin_build.py
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env python
import sys
sys.path.append("tools")
import os
import colors
import shutil
if os.name != "posix":
colors.println("r", "ERROR: only usable on unix systems")
exit()
# the initial working directory
cwd = os.getcwd()
if not os.path.exists(cwd + "/tamarin/bin"):
os.mkdir(cwd + "/tamarin/bin")
os.chdir(cwd + "/tamarin/bin")
def build_config(config):
colors.printf("d", "build the ")
colors.printf("r", config)
colors.println("d", " configuration? [y/n]")
return raw_input("")
build_debug_debugger = build_config("DEBUG_DEBUGGER")
build_debug = build_config("DEBUG")
build_release_debugger = build_config("RELEASE_DEBUGGER")
build_release = build_config("RELEASE")
# debug debugger build
if build_debug_debugger == "y":
colors.println("y", "configuring tamarin for DEBUG_DEBUGGER build...")
os.system("../configure.py --enable-debug --enable-debugger")
colors.println("y", "compiling tamarin...")
os.system("make clean")
os.system("make")
# rename the output files
shutil.move("libavmplus.a", "libavmplus_debugger_d.a");
shutil.move("libMMgc.a", "libMMgc_debugger_d.a");
# debug build
if build_debug == "y":
colors.println("y", "configuring tamarin for DEBUG build...")
os.system("../configure.py --enable-debug")
colors.println("y", "compiling tamarin...")
os.system("make clean")
os.system("make")
# rename the output files
shutil.move("libavmplus.a", "libavmplus_d.a");
shutil.move("libMMgc.a", "libMMgc_d.a");
shutil.move("libzlib.a", "libzlib_d.a");
# release debugger build
if build_release_debugger == "y":
colors.println("y", "configuring tamarin for RELEASE_DEBUGGER build...")
os.system("../configure.py --enable-debugger")
colors.println("y", "compiling tamarin...")
os.system("make clean")
os.system("make")
# rename the output files
shutil.move("libavmplus.a", "libavmplus_debugger.a");
shutil.move("libMMgc.a", "libMMgc_debugger.a");
# release build
if build_release == "y":
colors.println("y", "configuring tamarin for RELEASE build...")
os.system("../configure.py")
colors.println("y", "compiling tamarin...")
os.system("make clean")
os.system("make")