Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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