Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 292 lines (223 sloc) 7.769 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
0941eb2 Eric Hodel 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 Evan Phoenix compiler is dead, long live compiler1!
evanphx authored
7 $compiler = nil
0941eb2 Eric Hodel Add tasks to build .rba files
drbrain authored
8
9ebee09 Brian Shirai Add mspec and spec rakelib files from master.
brixen authored
9 RUBINIUS_BASE = File.expand_path(File.dirname(__FILE__))
10
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
11 # require 'tsort'
12 # require 'rakelib/rubinius'
13 # require 'rakelib/struct_generator'
14 # require 'rakelib/const_generator'
15 # require 'rakelib/types_generator'
da5f9e6 Brian Shirai Added load-order dependency generation to rake build:(core|platform) tas...
brixen authored
16
569fccd Eric Hodel Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake tas...
drbrain authored
17 task :default => %w[build vm:test]
8dd2b6b Evan Phoenix r43@vatu: evan | 2006-08-24 16:34:21 -0700
evanphx authored
18
c5b5a97 Eric Hodel 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
30 desc "Run the given ruby fil ewith the vm"
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 Eric Hodel run_ruby needs vm/vm
drbrain authored
44 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
45
a8bdc6b Evan Phoenix Cleanup / reorganize Rakefile
evanphx authored
46 # BUILD TASKS
47
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
48 # task :stable_compiler do
49 # if ENV['USE_CURRENT'] or ENV['SYSTEM']
50 # puts "Use current versions, not stable."
51 # else
52 # ENV['RBX_BOOTSTRAP'] = "runtime/stable/bootstrap.rba"
53 # ENV['RBX_CORE'] = "runtime/stable/core.rba"
54 # ENV['RBX_LOADER'] = "runtime/stable/loader.rbc"
55 # ENV['RBX_PLATFORM'] = "runtime/stable/platform.rba"
56 # end
57 # end
58
59 # files = FileList['kernel/core/*.rb']
60
61 # unless files.include?("kernel/core/dir.rb")
62 # files.add("kernel/core/dir.rb")
63 # end
64
65 # Core = CodeGroup.new(files, 'runtime/core', 'core')
66
67 # Bootstrap = CodeGroup.new 'kernel/bootstrap/*.rb', 'runtime/bootstrap',
68 # 'bootstrap'
69 # PlatformFiles = CodeGroup.new 'kernel/platform/*.rb', 'runtime/platform', 'platform'
70
71 # file 'runtime/loader.rbc' => 'kernel/loader.rb' do
72 # compile 'kernel/loader.rb', 'runtime/loader.rbc'
73 # end
74
75 # file 'runtime/stable/loader.rbc' => 'runtime/loader.rbc' do
76 # cp 'runtime/loader.rbc', 'runtime/stable', :verbose => $verbose
77 # end
78
79 # file 'runtime/stable/compiler.rba' => 'build:compiler' do |t|
80 # #sh "cd lib; zip -r ../runtime/stable/compiler.rba compiler -x \\*.rb"
81 # rm_f t.name
82 # rbc_files = Rake::FileList['compiler/**/*.rbc']
83
84 # Dir.chdir 'lib' do
85 # rbc_files.each do |rbc_file|
86 # ar_add "../#{t.name}", rbc_file
87 # end
88 # end
89 # end
90
91 # Rake::StructGeneratorTask.new do |t|
92 # t.dest = "lib/etc.rb"
93 # end
94
95 # Rake::StructGeneratorTask.new do |t|
96 # t.dest = 'lib/zlib.rb'
97 # end
98
99 # AllPreCompiled = Core.output + Bootstrap.output + PlatformFiles.output
100 # AllPreCompiled << "runtime/loader.rbc"
a8bdc6b Evan Phoenix Cleanup / reorganize Rakefile
evanphx authored
101
90ffc92 Eric Hodel Rip out irrelevant parts of the Rakefile
drbrain authored
102 desc "Build everything that needs to be built"
103 task :build => %w[
104 vm
105 kernel:build
106 ]
107 # build:rbc
108 # compiler
109 # lib/etc.rb
110 # lib/rbconfig.rb
111 # extensions
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
112
90ffc92 Eric Hodel Rip out irrelevant parts of the Rakefile
drbrain authored
113 namespace :build do
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
114
115 # task :setup_rbc => :stable_compiler
116
117 # task :rbc => ([:setup_rbc] + AllPreCompiled)
118
119 # task :compiler => :stable_compiler do
120 # compile_dir "lib/compiler"
121 # end
122
123 # desc "Rebuild runtime/stable/*. If you don't know why you're running this, don't."
124 # task :stable => %w[
125 # build:all
126 # runtime/stable/bootstrap.rba
127 # runtime/stable/core.rba
128 # runtime/stable/compiler.rba
129 # runtime/stable/loader.rbc
130 # runtime/stable/platform.rba
131 # ]
132
133 # desc "Rebuild the .load_order.txt files"
134 # task "load_order" do
135 # # Note: Steps to rebuild load_order were defined above
136 # end
137
138 # namespace :vm do
139 # task "clean" do
140 # sh "cd shotgun/lib; #{make "clean"}"
141 # end
142
143 # task "dev" do
144 # sh "cd shotgun/lib; #{make "DEV=1"}"
145 # end
146 # end
147
1c9328e Evan Phoenix Fix the kernel to not contain any system info
evanphx authored
148 end
138d1ef Eric Hodel Move extension building into its own namespace.
drbrain authored
149
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
150 # # INSTALL TASKS
cc28068 Rearranged rake setup a lot, making browsing more intuitive (build secti...
Ryan Davis authored
151
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
152 # desc "Install rubinius as rbx"
153 # task :install => :config_env do
154 # sh "cd shotgun; #{make "install"}"
3c0b50e Adam Gardiner Added doc:vm tasks to main Rakefile
agardiner authored
155
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
156 # mkdir_p ENV['RBAPATH'], :verbose => true
157 # mkdir_p ENV['CODEPATH'], :verbose => true
cc28068 Rearranged rake setup a lot, making browsing more intuitive (build secti...
Ryan Davis authored
158
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
159 # rba_files = Rake::FileList.new('runtime/platform.conf',
160 # 'runtime/**/*.rb{a,c}',
161 # 'runtime/**/.load_order.txt')
162
163 # install_files rba_files, ENV['RBAPATH']
164
165 # lib_files = Rake::FileList.new 'lib/**/*'
166
167 # install_files lib_files, ENV['CODEPATH']
168
169 # mkdir_p File.join(ENV['CODEPATH'], 'bin'), :verbose => true
170
171 # Rake::FileList.new("#{ENV['CODEPATH']}/**/*.rb").sort.each do |rb_file|
172 # sh File.join(ENV['BINPATH'], 'rbx'), 'compile', rb_file, :verbose => true
173 # end
174 # end
175
176 # desc "Uninstall rubinius and libraries. Helps with build problems."
177 # task :uninstall => :config_env do
178 # rm Dir[File.join(ENV['BINPATH'], 'rbx*')]
179 # rm_r Dir[File.join(ENV['LIBPATH'], '*rubinius*')]
180 # end
181
182 # task :config_env => 'shotgun/config.mk' do
183 # File.foreach 'shotgun/config.mk' do |line|
184 # next unless line =~ /(.*?)=(.*)/
185 # ENV[$1] = $2
186 # end
187 # end
188
189 # task :compiledir => :stable_compiler do
190 # dir = ENV['DIR']
191 # raise "Use DIR= to set which directory" if !dir or dir.empty?
192 # compile_dir(dir)
193 # end
194
195 # # CLEAN TASKS
196
90ffc92 Eric Hodel Rip out irrelevant parts of the Rakefile
drbrain authored
197 desc "Recompile all ruby system files"
198 task :rebuild => %w[clean build]
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
199
569fccd Eric Hodel Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake tas...
drbrain authored
200 desc 'Remove rubinius build files'
90ffc92 Eric Hodel Rip out irrelevant parts of the Rakefile
drbrain authored
201 task :clean => %w[vm:clean kernel:clean clean:crap]
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
202
569fccd Eric Hodel Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake tas...
drbrain authored
203 desc 'Remove rubinius build files and external library build files'
204 task :distclean => %w[vm:distclean]
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
205
569fccd Eric Hodel Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake tas...
drbrain authored
206 namespace :clean do
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
207 # desc "Cleans all compiled extension files (lib/ext)"
208 # task :extensions do
209 # Dir["lib/ext/**/*#{$dlext}"].each do |f|
210 # rm_f f, :verbose => $verbose
211 # end
212 # end
213
214 # desc "Cleans up generated files"
215 # task :generated do
216 # rm_f Dir["shotgun/lib/grammar.c"], :verbose => $verbose
217 # end
218
569fccd Eric Hodel Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake tas...
drbrain authored
219 desc "Cleans up editor files and other misc crap"
220 task :crap do
221 files = (Dir["*~"] + Dir["**/*~"]).uniq
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
222
569fccd Eric Hodel Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake tas...
drbrain authored
223 rm_f files, :verbose => $verbose unless files.empty?
224 end
225 end
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
226
227 # # SPEC TASKS
228 # desc "Run all 'known good' specs (task alias for spec:ci)"
229 # task :spec => 'spec:ci'
230
231 # namespace :spec do
232 # namespace :setup do
233 # # Setup for 'Subtend' specs. No need to call this yourself.
234 # task :subtend do
235 # Dir["spec/subtend/**/Rakefile"].each do |rakefile|
236 # sh "rake -f #{rakefile}"
237 # end
238 # end
239 # end
240
241 # desc "Run continuous integration examples"
242 # task :ci => :build do
243 # clear_compiler
244
245 # target = ENV['SPEC_TARGET'] || 'rbx'
246 # system %(shotgun/rubinius -e 'puts "rbx build: \#{Rubinius::BUILDREV}"') if target == 'rbx'
247 # sh "bin/mspec ci -t #{target}"
248 # end
249
250 # spec_targets = %w(compiler core language library parser rubinius)
251 # # Build a spec:<task_name> for each group of Rubinius specs
252 # spec_targets.each do |group|
253 # desc "Run #{group} examples"
254 # task group do
255 # sh "bin/mspec spec/#{group}"
256 # end
257 # end
258
259 # desc "Run subtend (Rubinius C API) examples"
260 # task :subtend => "spec:setup:subtend" do
261 # sh "bin/mspec spec/rubinius/subtend"
262 # end
263
264 # # Specdiffs to make it easier to see what your changes have affected :)
265 # desc 'Run specs and produce a diff against current base'
266 # task :diff => 'diff:run'
267
268 # namespace :diff do
269 # desc 'Run specs and produce a diff against current base'
270 # task :run do
271 # system 'bin/mspec -f ci -o spec/reports/specdiff.txt spec'
272 # system 'diff -u spec/reports/base.txt spec/reports/specdiff.txt'
273 # system 'rm spec/reports/specdiff.txt'
274 # end
275
276 # desc 'Replace the base spec file with a new one'
277 # task :replace do
278 # system 'bin/mspec -f ci -o spec/reports/base.txt spec'
279 # end
280 # end
281
282 # task :r2r do
283 # puts ARGV.inspect
284 # end
285 # end
286
287 # # MISC TASKS
288
289 # desc "Build task for CruiseControl"
290 # task :ccrb => [:build, 'spec:ci']
cc28068 Rearranged rake setup a lot, making browsing more intuitive (build secti...
Ryan Davis authored
291
Something went wrong with that request. Please try again.