author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 02 Apr 2018 21:51:24 +0000 | |
branch | stx-8.0.0 |
changeset 232 | 85c422506875 |
parent 204 | 1467c3e7c059 |
child 234 | 05943c900d5e |
permissions | -rwxr-xr-x |
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
1 |
desc 'Compile project' |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
2 |
task :compile => :'compile:all' |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
3 |
|
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 |
STX_TOP_DIR = BUILD_DIR / 'stx' |
136
29bd0a3c4a31
Makefiles: configure Smalltalk/X by defining TARGET rather then symlinking a file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
135
diff
changeset
|
6 |
STX_CONF_DIR = BUILD_DIR |
29bd0a3c4a31
Makefiles: configure Smalltalk/X by defining TARGET rather then symlinking a file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
135
diff
changeset
|
7 |
STX_RULES_DIR = BUILD_DIR / '..' / 'makelib' |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
8 |
if win32? |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
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
|
10 |
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
|
11 |
else |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
12 |
STC = STX_TOP_DIR / 'stc' / 'stc' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
13 |
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
|
14 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
15 |
|
181
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
16 |
# Return true if stx:stc and stx:librun sources should be removed as soon |
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
17 |
# as STC or librun is built. False otherwise (sources are not removed by |
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
|
18 |
# 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
|
19 |
# |
181
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
20 |
# Indeed this is a feeble protection as it's easy to trick this method. But |
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
|
21 |
# 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
|
22 |
# 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
|
23 |
# 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
|
24 |
def should_remove_librun_and_stc_sources |
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
25 |
!(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
|
26 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
|
181
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
28 |
STC_BINARY_FILES = [ |
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
29 |
'cpu_arm.h', |
176
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
30 |
'cpu_i386.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
31 |
'cpu_x86_64.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
32 |
'cpu_ia64.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
33 |
'stc.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
34 |
'stcIntern.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
35 |
'stcVMdata.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
36 |
'stcVMoffsets.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
37 |
'stxAsmMacros.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
38 |
'stxNames.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
39 |
'stxOSDefs.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
40 |
'stxTypeMacros.h', |
184
cd1312f41a17
8.0.0: Fixups after merging new branch "feature-94-revamp-thinlocks"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
181
diff
changeset
|
41 |
'thinlocks.h', |
176
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
42 |
'symbols.stc.seed', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
43 |
'version.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
44 |
'sha1.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
45 |
'sha1.c', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
46 |
'README', |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
47 |
|
176
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
48 |
# UNIX specific |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
49 |
'stx-config.sh', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
50 |
'linuxIntern.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
51 |
'freeBSDIntern.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
52 |
'macIntern.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
53 |
'Make.proto', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
54 |
'stc', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
55 |
'stc.1', |
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
56 |
|
176
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
57 |
# Windows specific |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
58 |
'stx-config.bat', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
59 |
'mingwmake.bat', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
60 |
'ntIntern.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
61 |
'nt.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
62 |
'Make.proto', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
63 |
'stc.exe', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
64 |
] |
181
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
65 |
|
176
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
66 |
LIBRUN_BINARY_FILES = [ |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
67 |
'libffi-3.2.1', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
68 |
'md5.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
69 |
'mcompiler.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
70 |
'main.c', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
71 |
'hmm.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
72 |
'hmm.c', |
184
cd1312f41a17
8.0.0: Fixups after merging new branch "feature-94-revamp-thinlocks"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
181
diff
changeset
|
73 |
'jsupport.h', |
204
1467c3e7c059
Rakefiles: keep `debug.h` and `debug.c` in pre-built stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
190
diff
changeset
|
74 |
'debug.h', |
1467c3e7c059
Rakefiles: keep `debug.h` and `debug.c` in pre-built stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
190
diff
changeset
|
75 |
'debug.c', |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
76 |
|
176
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
77 |
# UNIX specific |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
78 |
'librun.so', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
79 |
'librun.a', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
80 |
'symlist.c', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
81 |
'Make.proto', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
82 |
'makefile', |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
83 |
|
176
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
84 |
# Windows specific |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
85 |
'bc.mak', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
86 |
'mingwmake.bat', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
87 |
'buildDate.h', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
88 |
'genDate.com', |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
89 |
File.join('objmingw' , 'librun.dll'), |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
90 |
File.join('objmingw' , 'librun.lib'), |
181
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
91 |
] |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
92 |
|
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
93 |
def cleanup_stc |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
94 |
if should_remove_librun_and_stc_sources |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
95 |
puts 'Cleaning up stc...' |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
96 |
begin |
176
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
97 |
rm_rf_ex STX_TOP_DIR / 'stc', exceptions: STC_BINARY_FILES |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
98 |
rescue |
176
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
99 |
# When something goes wrong, be safe and remove whole directory... |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
100 |
rm_rf STX_TOP_DIR / 'stc' |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
101 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
102 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
103 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
104 |
|
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
105 |
def cleanup_librun |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
106 |
if should_remove_librun_and_stc_sources |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
107 |
puts 'Cleaning up librun...' |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
108 |
begin |
188
02b7bd705334
Rakefiles: fixed bug in `cleanup_librun()`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
181
diff
changeset
|
109 |
rm_rf_ex STX_TOP_DIR / 'librun', exceptions: LIBRUN_BINARY_FILES |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
110 |
rescue |
176
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
111 |
# When something goes wrong, be safe and remove whole directory... |
84363aa38ff4
Rakefiles: use (new) `rm_rf_ex()` file utility to wipe-out stx:stc and stx:librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
169
diff
changeset
|
112 |
rm_rf STX_TOP_DIR / 'librun' |
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
113 |
end |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
114 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
115 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
116 |
|
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
117 |
namespace :compile do |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
118 |
|
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
119 |
task :all => %i(prereq pre main post) |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
120 |
|
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
121 |
task :pre |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
122 |
task :post |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
123 |
|
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
124 |
task :prereq => %i(setup) |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
125 |
|
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
126 |
task :main => %i( |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
127 |
config |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
128 |
stc |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
129 |
librun |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
130 |
application |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
131 |
) |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
132 |
|
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
133 |
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
|
134 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
135 |
directory STX_TOP_DIR / 'include' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
136 |
|
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
137 |
task :application => :'setup:dependencies' |
93
650412e81596
Automatically extract package dependencies from project definition file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
138 |
|
650412e81596
Automatically extract package dependencies from project definition file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
87
diff
changeset
|
139 |
|
138 | 140 |
task :config => [ STX_CONF_DIR / 'stx-config.make' ] |
122
6fcb351d23a7
Use our own make configuration files rather than eXept's
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
141 |
|
181
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
142 |
directory STX_CONF_DIR do |
136
29bd0a3c4a31
Makefiles: configure Smalltalk/X by defining TARGET rather then symlinking a file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
135
diff
changeset
|
143 |
mkdir_p STX_CONF_DIR |
29bd0a3c4a31
Makefiles: configure Smalltalk/X by defining TARGET rather then symlinking a file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
135
diff
changeset
|
144 |
end |
181
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
145 |
|
136
29bd0a3c4a31
Makefiles: configure Smalltalk/X by defining TARGET rather then symlinking a file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
135
diff
changeset
|
146 |
file STX_CONF_DIR / 'stx-config.make' => STX_CONF_DIR do |
29bd0a3c4a31
Makefiles: configure Smalltalk/X by defining TARGET rather then symlinking a file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
135
diff
changeset
|
147 |
makelib_dir = Pathname.new(File.expand_path('makelib')).relative_path_from(Pathname.new(BUILD_DIR / 'stx' )) |
138 | 148 |
File.open(STX_CONF_DIR / 'stx-config.make', 'w') do | f | |
169
f9f519bb10b6
Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
168
diff
changeset
|
149 |
f.puts "BUILD_TARGET ?= #{BUILD_TARGET}" |
232
85c422506875
Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
204
diff
changeset
|
150 |
if defined? CC |
85c422506875
Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
204
diff
changeset
|
151 |
f.puts "CC ?= #{CC}" |
85c422506875
Makefiles: allow to specify C compiler on a command line
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
204
diff
changeset
|
152 |
end |
136
29bd0a3c4a31
Makefiles: configure Smalltalk/X by defining TARGET rather then symlinking a file
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
135
diff
changeset
|
153 |
end |
181
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
154 |
end |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
155 |
|
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
156 |
rule 'makefile' do |t| |
169
f9f519bb10b6
Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
168
diff
changeset
|
157 |
chdir File.dirname(t.name) do |
f9f519bb10b6
Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
168
diff
changeset
|
158 |
sh "'#{STX_TOP_DIR / 'rules' / 'stmkmf'}'" |
f9f519bb10b6
Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
168
diff
changeset
|
159 |
end |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
160 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
161 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
162 |
task :stc do |
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
163 |
chdir STX_TOP_DIR / 'stc' do |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
164 |
begin |
169
f9f519bb10b6
Use GNU target triplets to specify build targets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
168
diff
changeset
|
165 |
make |
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
166 |
cleanup_stc |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
167 |
rescue Exception => e |
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
168 |
cleanup_stc |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
169 |
cleanup_librun |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
170 |
error "Cannot compile stx:stc: #{e.message}" |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
171 |
end |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
172 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
173 |
|
138 | 174 |
(cp STX_TOP_DIR / 'stc' / 'stx-config.h', STX_TOP_DIR / 'include' / 'stx-config.h') unless File.exist?(STX_TOP_DIR / 'include' / 'stx-config.h') |
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
175 |
|
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
176 |
unless File.exist? STC |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
177 |
cleanup_stc |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
178 |
cleanup_librun |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
179 |
error 'Cannot compile stx:stc' |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
180 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
181 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
182 |
|
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
183 |
task :librun do |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
184 |
chdir STX_TOP_DIR / 'librun' do |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
185 |
begin |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
186 |
begin |
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
187 |
if win32_wine? |
138 | 188 |
(mkdir 'libffi' / 'build_win32' / 'objbc') unless File.exist?('libffi' / 'build_win32' / 'objbc') |
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
189 |
end |
181
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
190 |
# A workaround for Windows 10 & ancient Borland make which |
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
|
191 |
# 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
|
192 |
# librun. Sigh, we have to move away from it as soon as possible! |
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
193 |
(touch 'stxmain.c') if (win32? and File.exist? 'stxmain.c') |
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
|
194 |
make |
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
195 |
cleanup_librun |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
196 |
rescue Exception => e |
137
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
197 |
cleanup_stc |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
198 |
cleanup_librun |
e665031cade7
Cleaning up code and having it more rubyish
Patrik Svestka <patrik.svestka@gmail.com>
parents:
122
diff
changeset
|
199 |
error "Cannot compile stx:librun: #{e.message}" |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
200 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
201 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
202 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
203 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
204 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
205 |
if unix? |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
206 |
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
|
207 |
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
|
208 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
209 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
210 |
if win32? and TOOLCHAIN == 'bcc' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
211 |
directory STX_TOP_DIR / 'lib' / 'bc' |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
212 |
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
|
213 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
214 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
215 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
216 |
|
133
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
217 |
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
|
218 |
|
97
33cf3197acb5
Added hack for compiling 32bit stx:libdb/libodbc on 64bit Linux
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
94
diff
changeset
|
219 |
# |
33cf3197acb5
Added hack for compiling 32bit stx:libdb/libodbc on 64bit Linux
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
94
diff
changeset
|
220 |
# Various compilation hacks here and there (sigh) |
181
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
221 |
# |
133
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
222 |
desc "Update the VM symbol database" |
181
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
223 |
task 'stx:librun:symbols' do | task | |
133
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
224 |
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
|
225 |
if unix? |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
226 |
# 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
|
227 |
# 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
|
228 |
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
|
229 |
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
|
230 |
|
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
231 |
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
|
232 |
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
|
233 |
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
|
234 |
end |
181
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
235 |
elsif win32? |
133
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
236 |
# 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
|
237 |
# 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
|
238 |
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
|
239 |
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
|
240 |
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
|
241 |
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
|
242 |
end |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
243 |
end |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
244 |
task.reenable() |
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
245 |
end |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
246 |
|
97
33cf3197acb5
Added hack for compiling 32bit stx:libdb/libodbc on 64bit Linux
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
94
diff
changeset
|
247 |
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
|
248 |
# 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
|
249 |
# 32bit libodbc.a / libodbcinst.a. Link directly against .so |
181
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
250 |
task :'stx:libdb/libodbc:pre' do |
97
33cf3197acb5
Added hack for compiling 32bit stx:libdb/libodbc on 64bit Linux
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
94
diff
changeset
|
251 |
sed('-lodbc -lodbcinst' , '-l:libodbc.so.2 -l:libodbcinst.so.2', BUILD_DIR / 'stx' / 'libdb' / 'libodbc' / 'Make.proto', true) |
181
3aaf65a5541c
Rakefiles: removed tasks to build VOGL
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
176
diff
changeset
|
252 |
end |
0
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
253 |
end |
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
254 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
255 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
256 |
|
f46260ba26b1
Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
257 |
|
133
8229af6e81df
Rakefiles: update VM's symbol database after a package compiled
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
122
diff
changeset
|
258 |