author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 03 Aug 2017 09:37:46 +0100 | |
changeset 135 | 0325651d2b43 |
parent 133 | 8229af6e81df |
child 136 | 29bd0a3c4a31 |
permissions | -rw-r--r-- |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
1 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
2 |
desc "Compile project" |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
3 |
task :'compile' => :'compile:all' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
4 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
5 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
6 |
STX_TOP_DIR = BUILD_DIR / 'stx' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
7 |
STX_CONF_DIR = STX_TOP_DIR / 'configurations' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
8 |
STX_RULES_DIR = STX_TOP_DIR / 'rules' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
if win32? |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
10 |
STC = STX_TOP_DIR / 'stc' / 'stc.exe' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
11 |
LIBRUN = STX_TOP_DIR / 'librun' / 'objmingw' / 'librun.dll' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
12 |
else |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
13 |
STC = STX_TOP_DIR / 'stc' / 'stc' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
14 |
LIBRUN = STX_TOP_DIR / 'librun' / 'librun.so' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
15 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
16 |
|
91
76f23122e86a
Added option (env var) to tell rakefiles to retain stc and librun sources.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
17 |
# Return true if stx:stc and stx:librun sources should be removed as soon |
76f23122e86a
Added option (env var) to tell rakefiles to retain stc and librun sources.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
18 |
# as STC or librun is built. False otherwise (sources are not removed by |
76f23122e86a
Added option (env var) to tell rakefiles to retain stc and librun sources.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
19 |
# rakefiles) |
76f23122e86a
Added option (env var) to tell rakefiles to retain stc and librun sources.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
20 |
# |
76f23122e86a
Added option (env var) to tell rakefiles to retain stc and librun sources.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
21 |
# Indeed this is a feeble protection as it's easy to trick this method. But |
76f23122e86a
Added option (env var) to tell rakefiles to retain stc and librun sources.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
22 |
# the goal is not to protect sources but rather have a secondaty measure to |
76f23122e86a
Added option (env var) to tell rakefiles to retain stc and librun sources.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
23 |
# avoid sources to leak (for exaple, due to a bug in packaging scripts). |
76f23122e86a
Added option (env var) to tell rakefiles to retain stc and librun sources.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
24 |
# Unathorized subjects should not be able to checkout sources in first instance. |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
25 |
def should_remove_librun_and_stc_sources |
107
e6d325dbc81b
Oops, fixed `should_remove_stc_and_librun_sources()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
26 |
return ! (core_developer? or ENV['RETAIN_STX_AND_LIBRUN_SOURCE'] == 'yespleaseretain!') |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
29 |
def rm_rf_all_in_except(directory, exceptions = []) |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
30 |
if File.directory? directory then |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
Dir.foreach(directory) do | each | |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
32 |
if each != '.' and each != '..' and not exceptions.include? each |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
33 |
rm_rf File.join(directory, each) |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
34 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
35 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
36 |
else |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
37 |
rm_f directory |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
38 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
39 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
40 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
41 |
if unix? |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
42 |
STC_BINARY_FILES = [ |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
43 |
'cpu_alpha.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
44 |
'cpu_arm.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
45 |
'cpu_hppa.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
46 |
'cpu_i386.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
47 |
'cpu_x86_64.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
48 |
'cpu_ia64.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
49 |
'cpu_mc68k.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
50 |
'cpu_mc88k.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
51 |
'cpu_mips.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
52 |
'cpu_ns32k.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
53 |
'cpu_power.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
54 |
'cpu_s390.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
55 |
'cpu_sparc.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
56 |
'cpu_vax.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
57 |
'stc.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
58 |
'stcIntern.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
59 |
'stcVMdata.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
60 |
'stcVMoffsets.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
61 |
'stxAsmMacros.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
62 |
'stxNames.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
63 |
'stxOSDefs.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
64 |
'stxTypeMacros.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
65 |
'symbols.stc.seed', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
66 |
'version.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
67 |
'README', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
68 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
69 |
#unix specific |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
70 |
'stx-config.sh', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
71 |
'linuxIntern.h', |
11
f7dc950d8df8
Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
9
diff
changeset
|
72 |
'macIntern.h', |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
73 |
'Make.proto', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
74 |
'stc', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
75 |
'stc.1', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
76 |
] |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
77 |
LIBRUN_BINARY_FILES1 = [ |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
78 |
'libffi-3.2.1', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
79 |
'md5.h', |
44
966a30552617
Added mcompiler.h to list files included in binary distribution of librun.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
39
diff
changeset
|
80 |
'mcompiler.h', |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
81 |
'main.c', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
82 |
'librun.so', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
83 |
'librun.a', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
84 |
'symlist.c', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
85 |
'Make.proto', |
135
0325651d2b43
Makefiles: use our own makefiles rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
133
diff
changeset
|
86 |
'makefile', |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
87 |
] |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
88 |
LIBRUN_BINARY_FILES2 = [] |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
89 |
elsif win32? |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
90 |
STC_BINARY_FILES = [ |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
91 |
'cpu_alpha.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
92 |
'cpu_arm.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
93 |
'cpu_hppa.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
94 |
'cpu_i386.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
95 |
'cpu_x86_64.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
96 |
'cpu_ia64.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
97 |
'cpu_mc68k.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
98 |
'cpu_mc88k.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
99 |
'cpu_mips.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
100 |
'cpu_ns32k.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
101 |
'cpu_power.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
102 |
'cpu_s390.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
103 |
'cpu_sparc.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
104 |
'cpu_vax.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
105 |
'stc.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
106 |
'stcIntern.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
107 |
'stcVMdata.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
108 |
'stcVMoffsets.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
109 |
'stxAsmMacros.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
110 |
'stxNames.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
111 |
'stxOSDefs.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
112 |
'stxTypeMacros.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
113 |
'symbols.stc.seed', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
114 |
'version.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
115 |
'README', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
116 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
117 |
#windows specific |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
118 |
'stx-config.bat', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
119 |
'mingwmake.bat', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
120 |
'ntIntern.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
121 |
'nt.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
122 |
'Make.proto', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
123 |
'stc.exe', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
124 |
] |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
125 |
LIBRUN_BINARY_FILES1 = [ |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
126 |
'libffi-3.2.1', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
127 |
'md5.h', |
45
5d8bcdc92f85
Oops, also keep mcompiler.h on Windows!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
44
diff
changeset
|
128 |
'mcompiler.h', |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
129 |
'main.c', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
130 |
'objmingw', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
131 |
'bc.mak', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
132 |
'mingwmake.bat', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
133 |
'buildDate.h', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
134 |
'genDate.com', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
135 |
] |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
136 |
LIBRUN_BINARY_FILES2 = [ |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
137 |
'librun.dll', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
138 |
'librun.lib', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
139 |
] |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
140 |
else |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
141 |
raise Exception.new("Unsupported platform") |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
142 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
143 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
144 |
def cleanup_stc() |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
145 |
if should_remove_librun_and_stc_sources() |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
146 |
puts "Cleaning up stc..." |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
147 |
begin |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
148 |
rm_rf_all_in_except(STX_TOP_DIR / 'stc', STC_BINARY_FILES) |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
149 |
rescue |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
150 |
# When something goes wrong, be safe and remove whole directory |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
151 |
rm_rf STX_TOP_DIR / 'stc' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
152 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
153 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
154 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
155 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
156 |
def cleanup_librun() |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
157 |
if should_remove_librun_and_stc_sources() |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
158 |
puts "Cleaning up librun..." |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
159 |
begin |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
160 |
rm_rf_all_in_except(STX_TOP_DIR / 'librun', LIBRUN_BINARY_FILES1) |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
161 |
if win32? then |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
162 |
rm_rf_all_in_except(STX_TOP_DIR / 'librun' / 'objmingw', LIBRUN_BINARY_FILES2) |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
163 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
164 |
rescue |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
165 |
# When something goes wrong, be safe and remove whole directory |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
166 |
rm_rf STX_TOP_DIR / 'librun' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
167 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
168 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
169 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
170 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
171 |
# Setup flags for GCC (both, real GCC and MinGW) |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
172 |
GCC_CFLAGS_OPT = ARCH == 'i386' ? '-O' : '' |
11
f7dc950d8df8
Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
9
diff
changeset
|
173 |
GCC_CFLAGS_DBG = core_developer? ? '-ggdb3' : '' |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
174 |
GCC_CFLAGS_PIC = win32? ? '' : '-fPIC' |
87
a4637233f94f
Oops, hack to allow passing OPT & LIBRUN_OPT to make from command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
52
diff
changeset
|
175 |
GCC_CFLAGS = "-pipe -fno-omit-frame-pointer -fno-stack-protector -fno-strict-aliasing -fwrapv #{GCC_CFLAGS_PIC} #{GCC_CFLAGS_OPT} #{GCC_CFLAGS_DBG}" |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
176 |
|
39
7a7c62fe520a
Win32: Force C language when compiling Smalltalk sources.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
177 |
# Sigh, for MINGW 5.x.x coming with MSYS2 we have to force C language as |
7a7c62fe520a
Win32: Force C language when compiling Smalltalk sources.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
178 |
# Borland make and build files are using funny suffixes to confuse GCC's |
7a7c62fe520a
Win32: Force C language when compiling Smalltalk sources.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
179 |
# language detection. Triple sigh here! |
7a7c62fe520a
Win32: Force C language when compiling Smalltalk sources.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
180 |
GCC_CFLAGS += " -x c" if win32? |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
181 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
182 |
namespace :'compile' do |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
183 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
184 |
task :'all' => [ :'prereq', :'pre', :'main', :'post' ] |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
185 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
186 |
task :'pre' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
187 |
task :'post' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
188 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
189 |
task :'prereq' => [ :'setup' ] |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
190 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
191 |
task :'main' => [ |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
192 |
:'config', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
193 |
:'libraries', |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
194 |
:'stc', |
93
650412e81596
Automatically extract package dependencies from project definition file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
195 |
:'librun', |
9
34274130f57a
Removed some old, dead code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3
diff
changeset
|
196 |
:'application', |
93
650412e81596
Automatically extract package dependencies from project definition file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
197 |
] |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
198 |
|
93
650412e81596
Automatically extract package dependencies from project definition file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
199 |
task :'config' => [ STX_TOP_DIR / 'include' ] |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
200 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
201 |
directory STX_TOP_DIR / 'include' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
202 |
|
93
650412e81596
Automatically extract package dependencies from project definition file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
203 |
task :'application' => :'setup:dependencies' |
650412e81596
Automatically extract package dependencies from project definition file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
204 |
|
650412e81596
Automatically extract package dependencies from project definition file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
205 |
|
135
0325651d2b43
Makefiles: use our own makefiles rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
133
diff
changeset
|
206 |
|
0325651d2b43
Makefiles: use our own makefiles rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
133
diff
changeset
|
207 |
if unix? |
0325651d2b43
Makefiles: use our own makefiles rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
133
diff
changeset
|
208 |
mkdir_p STX_CONF_DIR |
122
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
209 |
STX_CONF_DIR / 'vendorConf', |
135
0325651d2b43
Makefiles: use our own makefiles rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
133
diff
changeset
|
210 |
STX_CONF_DIR / 'myConf' ] |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
211 |
|
122
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
212 |
directory STX_CONF_DIR do | t | |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
213 |
mkdir_p t.name() |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
214 |
end |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
215 |
|
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
216 |
directory STX_CONF_DIR / 'COMMON' do | t | |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
217 |
mkdir_p t.name() |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
218 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
219 |
|
122
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
220 |
directory STX_CONF_DIR / 'COMMON' / 'defines' => STX_CONF_DIR / 'COMMON' do | t | |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
221 |
File.open(t.name(), "w") do | f | |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
222 |
f.puts <<-CONTENTS |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
223 |
# Do not edit! Automatically generated by rake (rakelib/#{__FILE__}) |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
224 |
# |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
225 |
# Nothing here, all "common" definitions are included in config file |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
226 |
# (`config-<OS>-<ARCH>.make`) |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
227 |
CONTENTS |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
228 |
end |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
229 |
end |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
230 |
|
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
231 |
file STX_CONF_DIR / 'vendorConf' => STX_CONF_DIR do | t | |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
232 |
makelib_dir = Pathname.new(File.expand_path('makelib')).relative_path_from(Pathname.new(BUILD_DIR / 'stx' )) |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
233 |
os = nil |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
234 |
case |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
235 |
when linux? |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
236 |
os = 'linux' |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
237 |
else |
122
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
238 |
raise Exveption.new("Unssuported operating system") |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
239 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
240 |
|
122
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
241 |
File.open(t.name(), "w") do | f | |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
242 |
f.puts <<-CONTENTS |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
243 |
# Do not edit! Automatically generated by rake (rakelib/#{__FILE__}) |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
244 |
# |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
245 |
TOP ?= #{BUILD_DIR / 'stx'} |
135
0325651d2b43
Makefiles: use our own makefiles rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
133
diff
changeset
|
246 |
MAKELIB ?= $(TOP)/#{makelib_dir} |
0325651d2b43
Makefiles: use our own makefiles rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
133
diff
changeset
|
247 |
include $(MAKELIB)/config-#{os}-#{ARCH}.make |
122
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
248 |
CONTENTS |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
249 |
end |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
250 |
end |
87
a4637233f94f
Oops, hack to allow passing OPT & LIBRUN_OPT to make from command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
52
diff
changeset
|
251 |
|
122
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
252 |
file STX_CONF_DIR / 'myConf' => STX_CONF_DIR do | t | |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
253 |
File.open(t.name(), "w") do | f | |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
254 |
f.puts <<-CONTENTS |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
255 |
# Local modifications / additions specific to this very build, if needed. |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
256 |
# |
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
257 |
CONTENTS |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
258 |
end |
135
0325651d2b43
Makefiles: use our own makefiles rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
133
diff
changeset
|
259 |
end |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
260 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
261 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
262 |
rule 'makefile' do | t | |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
263 |
if File.exist?(File.dirname(t.name) / 'GNUmakefile') |
102
fc572bd895f2
Cleanup: treat stx:stc & stx:librun as normal packages
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
101
diff
changeset
|
264 |
rm (File.dirname(t.name) / 'GNUmakefile') |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
265 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
266 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
267 |
chdir File.dirname(t.name) do |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
268 |
sh "'#{STX_TOP_DIR / 'rules' / 'stmkmf'}'" |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
269 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
270 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
271 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
272 |
task :stc do |
3
18c56730fabf
Renamed `amd64?` to `x86_64?` for consistency
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
273 |
if linux? and x86_64? and ARCH == 'i386' |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
274 |
stx_make_flags="STC_LEXLIB=libfl/libfl_pic.a" |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
275 |
else |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
276 |
stx_make_flags="" |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
277 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
278 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
279 |
chdir STX_TOP_DIR / 'stc' do |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
280 |
begin |
91
76f23122e86a
Added option (env var) to tell rakefiles to retain stc and librun sources.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
281 |
make stx_make_flags |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
282 |
cleanup_stc() |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
283 |
rescue Exception => e |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
284 |
cleanup_stc() |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
285 |
cleanup_librun() |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
286 |
error "Cannot compile stx:stc: #{e.description}" |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
287 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
288 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
289 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
290 |
if not File.exist? STX_TOP_DIR / 'include' / 'stx-config.h' then |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
291 |
cp STX_TOP_DIR / 'stc' / 'stx-config.h' , STX_TOP_DIR / 'include' / 'stx-config.h' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
292 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
293 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
294 |
if not File.exist? STC |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
295 |
cleanup_stc() |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
296 |
cleanup_librun() |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
297 |
error "Cannot compile stx:stc" |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
298 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
299 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
300 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
301 |
task :librun do |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
302 |
chdir STX_TOP_DIR / 'librun' do |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
303 |
begin |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
304 |
begin |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
305 |
if win32_wine? |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
306 |
if not File.exist? 'libffi' / 'build_win32' / 'objbc' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
307 |
mkdir 'libffi' / 'build_win32' / 'objbc' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
308 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
309 |
end |
111
767f2ace9b82
Win32: A nasty workaround to avoid Borland make to crash under Windows 10
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
310 |
# A workaround for Windows 10 & ancient Borland make which |
767f2ace9b82
Win32: A nasty workaround to avoid Borland make to crash under Windows 10
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
311 |
# tend to crash there when trying to recompile already compiled |
767f2ace9b82
Win32: A nasty workaround to avoid Borland make to crash under Windows 10
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
312 |
# librun. Sigh, we have to move away from it as soon as possible! |
767f2ace9b82
Win32: A nasty workaround to avoid Borland make to crash under Windows 10
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
313 |
|
767f2ace9b82
Win32: A nasty workaround to avoid Borland make to crash under Windows 10
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
314 |
if win32? and (File.exist? 'stxmain.c') then |
767f2ace9b82
Win32: A nasty workaround to avoid Borland make to crash under Windows 10
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
315 |
touch "stxmain.c" |
767f2ace9b82
Win32: A nasty workaround to avoid Borland make to crash under Windows 10
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
316 |
end |
91
76f23122e86a
Added option (env var) to tell rakefiles to retain stc and librun sources.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
317 |
make |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
318 |
cleanup_librun() |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
319 |
rescue Exception => e |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
320 |
cleanup_stc() |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
321 |
cleanup_librun() |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
322 |
error "Cannot compile stx:librun: #{e.description}" |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
323 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
324 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
325 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
326 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
327 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
328 |
if unix? |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
329 |
task :stc => STX_TOP_DIR / 'stc' / 'makefile' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
330 |
task :librun => STX_TOP_DIR / 'librun' / 'makefile' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
331 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
332 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
333 |
if win32? and TOOLCHAIN == 'bcc' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
334 |
directory STX_TOP_DIR / 'lib' / 'bc' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
335 |
task :librun => STX_TOP_DIR / 'lib' / 'bc' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
336 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
337 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
338 |
task :'libraries' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
339 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
340 |
if unix? |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
341 |
vogl_dir = STX_TOP_DIR / 'support' / 'VGL' / 'vogl' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
342 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
343 |
task 'libraries' => [ vogl_dir / 'src' / 'libvogl.a' ] |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
344 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
345 |
file vogl_dir / 'src' / 'libvogl.a' => [ vogl_dir / 'makefile' ] do |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
346 |
chdir STX_TOP_DIR / 'support' / 'VGL' / 'vogl' do |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
347 |
make |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
348 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
349 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
350 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
351 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
352 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
353 |
|
133
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
354 |
task "stx:librun:symbols" |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
355 |
|
97
33cf3197acb5
Added hack for compiling 32bit stx:libdb/libodbc on 64bit Linux
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
94
diff
changeset
|
356 |
# |
33cf3197acb5
Added hack for compiling 32bit stx:libdb/libodbc on 64bit Linux
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
94
diff
changeset
|
357 |
# Various compilation hacks here and there (sigh) |
33cf3197acb5
Added hack for compiling 32bit stx:libdb/libodbc on 64bit Linux
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
94
diff
changeset
|
358 |
# |
133
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
359 |
desc "Update the VM symbol database" |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
360 |
task 'stx:librun:symbols' do | task | |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
361 |
symbols_stc = BUILD_DIR / 'stx' / 'include' / 'symbols.stc' |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
362 |
if unix? |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
363 |
# UNIX VMs have the symbol database built into the binary as |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
364 |
# static data so we need to recompile the VM |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
365 |
stx_librun = project.package('stx:librun') |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
366 |
stx_librun_dll = BUILD_DIR / stx_librun.directory() / OBJ_DIR / stx_librun.dll_name() |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
367 |
|
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
368 |
if not uptodate?(stx_librun_dll, [ symbols_stc ]) then |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
369 |
Rake::Task["stx:librun"].reenable() |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
370 |
Rake::Task["stx:librun"].invoke() |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
371 |
end |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
372 |
elsif win32? |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
373 |
# Windows VM reads the symbol database from a file `symbols.stc` located |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
374 |
# alongside the program executable so we need to copy that file |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
375 |
app = project.application |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
376 |
symbols_stc_in_app_directory = BUILD_DIR / app.directory() / 'symbols.stc' |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
377 |
if not uptodate?(symbols_stc_in_app_directory, [ symbols_stc ]) then |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
378 |
cp symbols_stc, symbols_stc_in_app_directory |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
379 |
end |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
380 |
end |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
381 |
task.reenable() |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
382 |
end |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
383 |
|
97
33cf3197acb5
Added hack for compiling 32bit stx:libdb/libodbc on 64bit Linux
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
94
diff
changeset
|
384 |
if unix? |
33cf3197acb5
Added hack for compiling 32bit stx:libdb/libodbc on 64bit Linux
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
94
diff
changeset
|
385 |
# A hack for Debian (and possibly other Linux distros) that does not ship |
33cf3197acb5
Added hack for compiling 32bit stx:libdb/libodbc on 64bit Linux
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
94
diff
changeset
|
386 |
# 32bit libodbc.a / libodbcinst.a. Link directly against .so |
33cf3197acb5
Added hack for compiling 32bit stx:libdb/libodbc on 64bit Linux
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
94
diff
changeset
|
387 |
task :'stx:libdb/libodbc:pre' do |
33cf3197acb5
Added hack for compiling 32bit stx:libdb/libodbc on 64bit Linux
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
94
diff
changeset
|
388 |
sed('-lodbc -lodbcinst' , '-l:libodbc.so.2 -l:libodbcinst.so.2', BUILD_DIR / 'stx' / 'libdb' / 'libodbc' / 'Make.proto', true) |
33cf3197acb5
Added hack for compiling 32bit stx:libdb/libodbc on 64bit Linux
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
94
diff
changeset
|
389 |
end |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
390 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
391 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
392 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
393 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
394 |
|
133
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
395 |