Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 112 lines (83 sloc) 2.714 kb
90c05c1 Eric Hodel Update INSTALL to latest information.
drbrain authored
1 # NOTE! When updating this file, also update INSTALL, if necessary.
a8bdc6b Evan Phoenix Cleanup / reorganize Rakefile
evanphx authored
2 # NOTE! Please keep your tasks grouped together.
90c05c1 Eric Hodel Update INSTALL to latest information.
drbrain authored
3
69a6063 Enable warnings for rake.
Tilman Sauerbeck authored
4 $VERBOSE = true
bdcf9cb Eero Saynatkari DEV is gone. See `rake build:help`. vm:test always uses debug flags.
rue authored
5 $verbose = Rake.application.options.trace || ARGV.delete("-v")
6
be4319e Don't hardcode extension suffixes to 'bundle'.
Tilman Sauerbeck authored
7 $dlext = Config::CONFIG["DLEXT"]
eda2c1b Evan Phoenix compiler is dead, long live compiler1!
evanphx authored
8 $compiler = nil
0941eb2 Eric Hodel Add tasks to build .rba files
drbrain authored
9
9ebee09 Brian Shirai Add mspec and spec rakelib files from master.
brixen authored
10 RUBINIUS_BASE = File.expand_path(File.dirname(__FILE__))
11
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
12 # require 'tsort'
13 # require 'rakelib/rubinius'
da5f9e6 Brian Shirai Added load-order dependency generation to rake build:(core|platform) tas...
brixen authored
14
574448c Fixed spec:compiler to run -tr. Added to default task. Fixed :script bre...
Ryan Davis authored
15 task :default => %w[build vm:test spec:compiler]
8dd2b6b Evan Phoenix r43@vatu: evan | 2006-08-24 16:34:21 -0700
evanphx authored
16
c5b5a97 Eric Hodel Move run_ruby, compile_ruby to main Rakefile and set RBX_RUNTIME
drbrain authored
17 desc "Compile the given ruby file into a .rbc file"
18 task :compile_ruby, :file do |task, args|
19 file = args[:file]
20 raise ArgumentError, 'compile_ruby requires a file name' if file.nil?
21
22 rbc = file + 'c'
23
24 compile_ruby file, rbc
25 end
26 task :compile_ruby => 'kernel:build' # HACK argument + dependency is broken
27
46b6e4d Eric Hodel Add precompile task
drbrain authored
28 desc "Run the given ruby file with the vm"
c5b5a97 Eric Hodel Move run_ruby, compile_ruby to main Rakefile and set RBX_RUNTIME
drbrain authored
29 task :run_ruby, :file do |task, args|
30 file = args[:file]
31 raise ArgumentError, 'compile_ruby requires a file name' if file.nil?
32
33 rbc = file + 'c'
34
35 compile_ruby file, rbc
36
37 ENV['PROBE'] = 'yes' if $verbose
38 ENV['RBX_RUNTIME'] = File.join File.dirname(__FILE__), 'runtime'
39
40 sh 'vm/vm', rbc
41 end
8e08782 Eric Hodel run_ruby needs vm/vm
drbrain authored
42 task :run_ruby => %w[kernel:build vm/vm] # HACK argument + dependency is broken
c5b5a97 Eric Hodel Move run_ruby, compile_ruby to main Rakefile and set RBX_RUNTIME
drbrain authored
43
46b6e4d Eric Hodel Add precompile task
drbrain authored
44 desc "Compile files with MRI because vm takes forever to do it"
45 task :precompile => %w[extensions] do
562a6b1 Expanded precompile dir list
Ryan Davis authored
46 FileList['{mspec,kernel,lib,spec}/**/*.rb'].each do |rb|
46b6e4d Eric Hodel Add precompile task
drbrain authored
47 next unless File.file? rb
48
49 rbc = "#{rb}c"
50
51 if File.exist? rbc then
52 rbc_mtime = File.mtime rbc
53 next if rbc_mtime >= COMPILER_MTIME or rbc_mtime >= File.mtime(rb)
54 end
55
56 mri_compile rb, rbc
57 end
58 end
59
bdcf9cb Eero Saynatkari DEV is gone. See `rake build:help`. vm:test always uses debug flags.
rue authored
60 # See vm.rake for more information
61 desc "Build everything that needs to be built at default level."
62 task :build => "build:normal"
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
63
90ffc92 Eric Hodel Rip out irrelevant parts of the Rakefile
drbrain authored
64 desc "Recompile all ruby system files"
65 task :rebuild => %w[clean build]
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
66
569fccd Eric Hodel Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake tas...
drbrain authored
67 desc 'Remove rubinius build files'
af222ee Eric Hodel Restore generation of ruby_config and rubinius_config, add clean rules
drbrain authored
68 task :clean => %w[
69 vm:clean
70 kernel:clean
71 clean:crap
72 extension:clean
73 configure:clean
74 ]
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
75
569fccd Eric Hodel Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake tas...
drbrain authored
76 desc 'Remove rubinius build files and external library build files'
af222ee Eric Hodel Restore generation of ruby_config and rubinius_config, add clean rules
drbrain authored
77 task :distclean => %w[
78 clean
79 vm:distclean
80 ]
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
81
5c51236 Ari Brown added task :compare to the Rakefile on cpp branch
seydar authored
82 def rbx_compile(from)
83 sh "bin/rbx compile -f #{from}"
84 end
85
86 desc 'Compare an rbc file made by MRI with one made by rbx'
87 task :compare, :file do |task, args|
88 file = args[:file]
89 raise "Please supply something that exists" unless File.exist? file
90
91 mri_compile file, file + 'c.mri'
92 rbx_compile file
93
94 File.open(file + 'c.mri') do |mri|
95 File.open(file + 'c') do |rbx|
96 while m = mri.gets and r = rbx.gets
97 puts "Line of Failure: #{rbx.lineno}" and break unless m === r
98 end
99 end
100 end
101
102 end
103
569fccd Eric Hodel Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake tas...
drbrain authored
104 namespace :clean do
105 desc "Cleans up editor files and other misc crap"
106 task :crap do
107 files = (Dir["*~"] + Dir["**/*~"]).uniq
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
108
569fccd Eric Hodel Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake tas...
drbrain authored
109 rm_f files, :verbose => $verbose unless files.empty?
110 end
111 end
Something went wrong with that request. Please try again.