Skip to content
Newer
Older
100644 351 lines (274 sloc) 9.28 KB
90c05c1 @drbrain Update INSTALL to latest information.
drbrain authored
1 # NOTE! When updating this file, also update INSTALL, if necessary.
a8bdc6b @evanphx Cleanup / reorganize Rakefile
evanphx authored
2 # NOTE! Please keep your tasks grouped together.
90c05c1 @drbrain Update INSTALL to latest information.
drbrain authored
3
69a6063 Enable warnings for rake.
Tilman Sauerbeck authored
4 $VERBOSE = true
0941eb2 @drbrain Add tasks to build .rba files
drbrain authored
5 $verbose = Rake.application.options.trace
be4319e Don't hardcode extension suffixes to 'bundle'.
Tilman Sauerbeck authored
6 $dlext = Config::CONFIG["DLEXT"]
eda2c1b @evanphx compiler is dead, long live compiler1!
evanphx authored
7 $compiler = nil
0941eb2 @drbrain Add tasks to build .rba files
drbrain authored
8
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
9 # require 'tsort'
10 # require 'rakelib/rubinius'
11 # require 'rakelib/struct_generator'
12 # require 'rakelib/const_generator'
13 # require 'rakelib/types_generator'
da5f9e6 @brixen Added load-order dependency generation to rake build:(core|platform) …
brixen authored
14
93c6297 @drbrain Add install task, remove tasks task, make build task default, make ob…
drbrain authored
15 task :default => :build
8dd2b6b @evanphx r43@vatu: evan | 2006-08-24 16:34:21 -0700
evanphx authored
16
a8bdc6b @evanphx Cleanup / reorganize Rakefile
evanphx authored
17 # BUILD TASKS
18
19 desc "Build everything that needs to be built"
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
20 task :build => 'build:vm'
21
22 # task :stable_compiler do
23 # if ENV['USE_CURRENT'] or ENV['SYSTEM']
24 # puts "Use current versions, not stable."
25 # else
26 # ENV['RBX_BOOTSTRAP'] = "runtime/stable/bootstrap.rba"
27 # ENV['RBX_CORE'] = "runtime/stable/core.rba"
28 # ENV['RBX_LOADER'] = "runtime/stable/loader.rbc"
29 # ENV['RBX_PLATFORM'] = "runtime/stable/platform.rba"
30 # end
31 # end
32
33 # rule ".rbc" => %w[.rb] do |t|
34 # compile t.source, t.name
35 # end
36
37 # files = FileList['kernel/core/*.rb']
38
39 # unless files.include?("kernel/core/dir.rb")
40 # files.add("kernel/core/dir.rb")
41 # end
42
43 # Core = CodeGroup.new(files, 'runtime/core', 'core')
44
45 # Bootstrap = CodeGroup.new 'kernel/bootstrap/*.rb', 'runtime/bootstrap',
46 # 'bootstrap'
47 # PlatformFiles = CodeGroup.new 'kernel/platform/*.rb', 'runtime/platform', 'platform'
48
49 # file 'runtime/loader.rbc' => 'kernel/loader.rb' do
50 # compile 'kernel/loader.rb', 'runtime/loader.rbc'
51 # end
52
53 # file 'runtime/stable/loader.rbc' => 'runtime/loader.rbc' do
54 # cp 'runtime/loader.rbc', 'runtime/stable', :verbose => $verbose
55 # end
56
57 # file 'runtime/stable/compiler.rba' => 'build:compiler' do |t|
58 # #sh "cd lib; zip -r ../runtime/stable/compiler.rba compiler -x \\*.rb"
59 # rm_f t.name
60 # rbc_files = Rake::FileList['compiler/**/*.rbc']
61
62 # Dir.chdir 'lib' do
63 # rbc_files.each do |rbc_file|
64 # ar_add "../#{t.name}", rbc_file
65 # end
66 # end
67 # end
68
69 # Rake::StructGeneratorTask.new do |t|
70 # t.dest = "lib/etc.rb"
71 # end
72
73 # Rake::StructGeneratorTask.new do |t|
74 # t.dest = 'lib/zlib.rb'
75 # end
76
77 # AllPreCompiled = Core.output + Bootstrap.output + PlatformFiles.output
78 # AllPreCompiled << "runtime/loader.rbc"
a8bdc6b @evanphx Cleanup / reorganize Rakefile
evanphx authored
79
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
80 namespace :build do
a8bdc6b @evanphx Cleanup / reorganize Rakefile
evanphx authored
81
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
82 # task :all => %w[
83 # build:shotgun
84 # build:platform
85 # build:rbc
86 # compiler
87 # lib/etc.rb
88 # lib/rbconfig.rb
89 # extensions
90 # ]
a8bdc6b @evanphx Cleanup / reorganize Rakefile
evanphx authored
91
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
92 task :vm => "vm/vm"
27d0364 @drbrain Build extensions with build:all
drbrain authored
93
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
94 file "vm/vm" do
5f9efc9 Clean up build process
Evan Phoenix authored
95 sh "cd vm; rake"
96 end
97
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
98 # task :simple => "build:rbc" do
99 # sh "cd vm; rake"
100 # end
101
102 # # This nobody rule lets use use all the shotgun files as
103 # # prereqs. This rule is run for all those prereqs and just
104 # # (obviously) does nothing, but it makes rake happy.
105 # rule '^shotgun/.+'
106
107 # # These files must be excluded from the c_source FileList
108 # # because they are build products (i.e. there is no rule
109 # # to build them, they will be built) and the c_source list
110 # # list gets created before they are deleted by the clean task.
111 # exclude_source = [
112 # /auto/,
113 # /instruction_names/,
114 # /node_types/,
115 # /grammar.c/,
116 # 'primitive_indexes.h',
117 # 'primitive_util.h'
118 # ]
119
120 # c_source = FileList[
121 # "shotgun/config.h",
122 # "shotgun/lib/*.[chy]",
123 # "shotgun/lib/*.rb",
124 # "shotgun/lib/subtend/*.[chS]",
125 # "shotgun/main.c",
126 # ].exclude(*exclude_source)
127
128 # file "shotgun/rubinius.bin" => c_source do
129 # sh make('vm')
130 # end
0f1b2d3 Build additional shared lib and binary which are used for dev mode
Evan Phoenix authored
131
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
132 # file "shotgun/rubinius.local.bin" => c_source do
133 # sh make('vm')
134 # end
135
136 # file 'shotgun/mkconfig.sh' => 'configure'
137 # file 'shotgun/config.mk' => %w[shotgun/config.h shotgun/mkconfig.sh shotgun/vars.mk]
138 # file 'shotgun/config.h' => %w[shotgun/mkconfig.sh shotgun/vars.mk] do
139 # sh "./configure"
140 # raise 'Failed to configure Rubinius' unless $?.success?
141 # end
142
143 # desc "Compiles shotgun (the C-code VM)"
144 # task :shotgun => %w[configure shotgun/rubinius.bin shotgun/rubinius.local.bin]
145
146 # task :setup_rbc => :stable_compiler
147
148 # task :rbc => ([:setup_rbc] + AllPreCompiled)
149
150 # task :compiler => :stable_compiler do
151 # compile_dir "lib/compiler"
152 # end
153
154 # desc "Rebuild runtime/stable/*. If you don't know why you're running this, don't."
155 # task :stable => %w[
156 # build:all
157 # runtime/stable/bootstrap.rba
158 # runtime/stable/core.rba
159 # runtime/stable/compiler.rba
160 # runtime/stable/loader.rbc
161 # runtime/stable/platform.rba
162 # ]
163
164 # desc "Rebuild the .load_order.txt files"
165 # task "load_order" do
166 # # Note: Steps to rebuild load_order were defined above
167 # end
168
169 # namespace :vm do
170 # task "clean" do
171 # sh "cd shotgun/lib; #{make "clean"}"
172 # end
173
174 # task "dev" do
175 # sh "cd shotgun/lib; #{make "DEV=1"}"
176 # end
177 # end
178
179 # task :platform => 'runtime/platform.conf'
1c9328e @evanphx Fix the kernel to not contain any system info
evanphx authored
180 end
138d1ef @drbrain Move extension building into its own namespace.
drbrain authored
181
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
182 # # INSTALL TASKS
cc28068 Rearranged rake setup a lot, making browsing more intuitive (build se…
Ryan Davis authored
183
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
184 # desc "Install rubinius as rbx"
185 # task :install => :config_env do
186 # sh "cd shotgun; #{make "install"}"
3c0b50e @agardiner Added doc:vm tasks to main Rakefile
agardiner authored
187
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
188 # mkdir_p ENV['RBAPATH'], :verbose => true
189 # mkdir_p ENV['CODEPATH'], :verbose => true
cc28068 Rearranged rake setup a lot, making browsing more intuitive (build se…
Ryan Davis authored
190
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
191 # rba_files = Rake::FileList.new('runtime/platform.conf',
192 # 'runtime/**/*.rb{a,c}',
193 # 'runtime/**/.load_order.txt')
194
195 # install_files rba_files, ENV['RBAPATH']
196
197 # lib_files = Rake::FileList.new 'lib/**/*'
198
199 # install_files lib_files, ENV['CODEPATH']
200
201 # mkdir_p File.join(ENV['CODEPATH'], 'bin'), :verbose => true
202
203 # Rake::FileList.new("#{ENV['CODEPATH']}/**/*.rb").sort.each do |rb_file|
204 # sh File.join(ENV['BINPATH'], 'rbx'), 'compile', rb_file, :verbose => true
205 # end
206 # end
207
208 # desc "Uninstall rubinius and libraries. Helps with build problems."
209 # task :uninstall => :config_env do
210 # rm Dir[File.join(ENV['BINPATH'], 'rbx*')]
211 # rm_r Dir[File.join(ENV['LIBPATH'], '*rubinius*')]
212 # end
213
214 # task :config_env => 'shotgun/config.mk' do
215 # File.foreach 'shotgun/config.mk' do |line|
216 # next unless line =~ /(.*?)=(.*)/
217 # ENV[$1] = $2
218 # end
219 # end
220
221 # task :compiledir => :stable_compiler do
222 # dir = ENV['DIR']
223 # raise "Use DIR= to set which directory" if !dir or dir.empty?
224 # compile_dir(dir)
225 # end
226
227 # # CLEAN TASKS
228
229 # desc "Recompile all ruby system files"
230 # task :rebuild => %w[clean build:all]
231
232 # desc "Alias for clean:all"
233 # task :clean => "clean:all"
234
235 # desc "Alias for clean:distclean"
236 # task :distclean => "clean:distclean"
237
238 # namespace :clean do
239 # desc "Clean everything but third-party libs"
240 # task :all => %w[clean:rbc clean:extensions clean:shotgun clean:generated clean:crap]
241
242 # desc "Clean everything including third-party libs"
243 # task :distclean => %w[clean:all clean:external]
244
245 # desc "Remove all compile system ruby files"
246 # task :rbc do
247 # files_to_delete = []
248 # files_to_delete += Dir["*.rbc"] + Dir["**/*.rbc"] + Dir["**/.*.rbc"]
249 # files_to_delete += Dir["**/.load_order.txt"]
250 # files_to_delete += ["runtime/platform.conf"]
251 # files_to_delete -= ["runtime/stable/loader.rbc"] # never ever delete this
252
253 # files_to_delete.each do |f|
254 # rm_f f, :verbose => $verbose
255 # end
256 # end
257
258 # desc "Cleans all compiled extension files (lib/ext)"
259 # task :extensions do
260 # Dir["lib/ext/**/*#{$dlext}"].each do |f|
261 # rm_f f, :verbose => $verbose
262 # end
263 # end
264
265 # desc "Cleans up VM building site"
266 # task :shotgun do
267 # sh make('clean')
268 # end
269
270 # desc "Cleans up generated files"
271 # task :generated do
272 # rm_f Dir["shotgun/lib/grammar.c"], :verbose => $verbose
273 # end
274
275 # desc "Cleans up VM and external libs"
276 # task :external do
277 # sh "cd shotgun; #{make('distclean')}"
278 # end
279
280 # desc "Cleans up editor files and other misc crap"
281 # task :crap do
282 # rm_f Dir["*~"] + Dir["**/*~"], :verbose => $verbose
283 # end
284 # end
285
286 # # SPEC TASKS
287 # desc "Run all 'known good' specs (task alias for spec:ci)"
288 # task :spec => 'spec:ci'
289
290 # namespace :spec do
291 # namespace :setup do
292 # # Setup for 'Subtend' specs. No need to call this yourself.
293 # task :subtend do
294 # Dir["spec/subtend/**/Rakefile"].each do |rakefile|
295 # sh "rake -f #{rakefile}"
296 # end
297 # end
298 # end
299
300 # desc "Run continuous integration examples"
301 # task :ci => :build do
302 # clear_compiler
303
304 # target = ENV['SPEC_TARGET'] || 'rbx'
305 # system %(shotgun/rubinius -e 'puts "rbx build: \#{Rubinius::BUILDREV}"') if target == 'rbx'
306 # sh "bin/mspec ci -t #{target}"
307 # end
308
309 # spec_targets = %w(compiler core language library parser rubinius)
310 # # Build a spec:<task_name> for each group of Rubinius specs
311 # spec_targets.each do |group|
312 # desc "Run #{group} examples"
313 # task group do
314 # sh "bin/mspec spec/#{group}"
315 # end
316 # end
317
318 # desc "Run subtend (Rubinius C API) examples"
319 # task :subtend => "spec:setup:subtend" do
320 # sh "bin/mspec spec/rubinius/subtend"
321 # end
322
323 # # Specdiffs to make it easier to see what your changes have affected :)
324 # desc 'Run specs and produce a diff against current base'
325 # task :diff => 'diff:run'
326
327 # namespace :diff do
328 # desc 'Run specs and produce a diff against current base'
329 # task :run do
330 # system 'bin/mspec -f ci -o spec/reports/specdiff.txt spec'
331 # system 'diff -u spec/reports/base.txt spec/reports/specdiff.txt'
332 # system 'rm spec/reports/specdiff.txt'
333 # end
334
335 # desc 'Replace the base spec file with a new one'
336 # task :replace do
337 # system 'bin/mspec -f ci -o spec/reports/base.txt spec'
338 # end
339 # end
340
341 # task :r2r do
342 # puts ARGV.inspect
343 # end
344 # end
345
346 # # MISC TASKS
347
348 # desc "Build task for CruiseControl"
349 # task :ccrb => [:build, 'spec:ci']
cc28068 Rearranged rake setup a lot, making browsing more intuitive (build se…
Ryan Davis authored
350
Something went wrong with that request. Please try again.