Skip to content
Newer
Older
100644 637 lines (532 sloc) 16.7 KB
31418f9 got rid of ugly compare.rb now just type "rake build_reports" and ope…
Mae authored
1 ROOT = File.expand_path(File.dirname(__FILE__))
2
d1bd375 Pruned spec section of Rakefile and abstracted some common-ness
Mae authored
3 def require_files(files)
4 files.each do |path|
3667fc9 @evanphx With this revision, we begin the time of the generational GC.
evanphx authored
5 begin
6 require(path)
7 rescue Object => e
8 STDERR.puts "Unable to load #{path}. #{e.message} (#{e.class})"
9 end
d1bd375 Pruned spec section of Rakefile and abstracted some common-ness
Mae authored
10 end
11 end
12
7d88640 @brixen fixed the rspec dependency in Rakefile. If rspec is not installed, th…
brixen authored
13 begin
14 require 'spec/rake/spectask'
15 rescue LoadError
c3f12a3 @brixen Made rspec a requirement of the build problem. Updated README and mov…
brixen authored
16 raise <<-EOM
17 Unable to load spec/rake/spectask. RSpec is a requirement to build Rubinius.
18 Please install RSpec before building (http://rspec.rubyforge.org).
19 EOM
7d88640 @brixen fixed the rspec dependency in Rakefile. If rspec is not installed, th…
brixen authored
20 end
42b5e9f @brixen added spec tasks :only to run only spec, :language for high level lan…
brixen authored
21
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
22 # specify the compiler to use
23 COMPILER="../bin/obsolete.rcompile"
24 # COMPILER="../shotgun/rubinius -c"
25
d1bd375 Pruned spec section of Rakefile and abstracted some common-ness
Mae authored
26 # require local rake libs
27 # doesn't do anything gracefully on load error (yet)
28 paths = Dir[ File.join(File.dirname(__FILE__), 'rake/*') ]
c3f12a3 @brixen Made rspec a requirement of the build problem. Updated README and mov…
brixen authored
29 require_files(paths)
d1bd375 Pruned spec section of Rakefile and abstracted some common-ness
Mae authored
30
42b5e9f @brixen added spec tasks :only to run only spec, :language for high level lan…
brixen authored
31 # By default, run all the specs and tests
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
32 task :default => :spec
8dd2b6b @evanphx r43@vatu: evan | 2006-08-24 16:34:21 -0700
evanphx authored
33
086f889 * bin/specrunner is a small bash kludge for running mini_rspec over
Eero Saynatkari authored
34 desc 'Run all specs'
35 task :spec => 'spec:new'
36 #desc "Run all specs and tests."
37 #task :spec do
38 # Rake::Task['spec:all'].invoke rescue got_error = true
39 #
40 # raise "Spec or test failures." if got_error
41 #end
6a03730 @evanphx Cleaned up some of the includes and fixed up the Rakefile to run the …
evanphx authored
42
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
43 namespace :spec do
44 desc "Run all specs and tests."
45 task :all do
42b5e9f @brixen added spec tasks :only to run only spec, :language for high level lan…
brixen authored
46 Rake::Task['spec:only'].invoke rescue got_error = true
47 Rake::Task['test:all'].invoke rescue got_error = true
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
48
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
49 raise "Spec or test failures." if got_error
50 end
e1683f8 @brixen updated rake task doc:contrib:easy. Added spec:setup:code_cache to cl…
brixen authored
51
52 desc "Setup code-cache directory"
53 task :setup => 'setup:code_cache'
54
55 namespace :setup do
56 desc "Setup code-cache directory"
57 task :code_cache do
58 Dir.mkdir "code-cache" unless File.exists?("code-cache")
59 FileUtils.rm Dir.glob("code-cache/*")
60 end
61 end
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
62
42b5e9f @brixen added spec tasks :only to run only spec, :language for high level lan…
brixen authored
63 desc "Run only specs but not any tests."
f68ad63 - Remove printf from cpu_raise_primitive_failure so that the screen d…
Mae authored
64 spec_targets = %w(language shotgun library core targets primitives)
917cd03 @brixen checking in Alan Hurdles patch to allow running specific files, e.g. …
brixen authored
65
66 # Convenience method to run a single spec test
67 spec_targets.each do |group|
68 spec_files = Dir[ File.join(File.dirname(__FILE__),"spec/#{group}/*_spec.rb") ]
69 GroupSpecTask.new(group)
70 namespace group do
71 spec_files.each do |file|
72 SpecificGroupSpecTask.new(File.basename(file, '_spec.rb'), :core)
73 end
74 end
75 end
76
0ff86ac @evanphx Fixed up sirb and added a little extra VM support so that the locals …
evanphx authored
77
917cd03 @brixen checking in Alan Hurdles patch to allow running specific files, e.g. …
brixen authored
78 task :only => spec_targets.collect! { |g| 'spec:' << g }
c15c7d0 rcov for library specs
Mae authored
79
d1bd375 Pruned spec section of Rakefile and abstracted some common-ness
Mae authored
80 # experimental -- need to adjust exclusions depending on what your testing
81 namespace :coverage do
82 desc "Generate a coverage report for the library specs."
83 GroupCoverageReport.new(:library)
cdfdc27 Added my idea of a sanity check against MRI for compatibility purposes
Mae authored
84
d1bd375 Pruned spec section of Rakefile and abstracted some common-ness
Mae authored
85 desc "Generate a coverage report for the core specs."
86 GroupCoverageReport.new(:core)
cdfdc27 Added my idea of a sanity check against MRI for compatibility purposes
Mae authored
87 end
086f889 * bin/specrunner is a small bash kludge for running mini_rspec over
Eero Saynatkari authored
88
89 # New runner
90 desc 'Run all specs'
91 task :new do
92 system 'bin/specrunner spec'
93 end
94
95 # Specdiffs to make it easier to see what your changes have affected :)
96 desc 'Run specs and produce a diff against current base'
97 task :diff => 'diff:run'
98
99 namespace :diff do
100 desc 'Run specs and produce a diff against current base'
101 task :run do
102 system 'bin/specrunner spec > /tmp/rbs_specdiff'
103 system 'diff -u spec/diffs/base.txt /tmp/rbs_specdiff'
104 system 'rm /tmp/rbs_specdiff'
105 end
106
107 desc 'Replace the base spec file with a new one'
108 task :replace do
109 system 'bin/specrunner spec > spec/diffs/base.txt'
110 end
111 end
0ff86ac @evanphx Fixed up sirb and added a little extra VM support so that the locals …
evanphx authored
112 end
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
113
48b8303 @brixen Changed rake test to be an alias of rake test:all. previous rake test…
brixen authored
114 desc "Alias for test:all"
115 task :test => 'test:all'
116
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
117 namespace :test do
118 desc "Run all tests."
119 task :all do
120 Rake::Task['test:core'].invoke rescue got_error = true
121 Rake::Task['test:shotgun'].invoke rescue got_error = true
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
122
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
123 raise "Test failures." if got_error
124 end
62fcdfc add a test:bfts task - doesn't use rubinius yet
Alexander Kellett authored
125
f3da43a summary: test:nativebfts
Alexander Kellett authored
126 desc "Runs BFTS on Ruby 1.8.*."
62fcdfc add a test:bfts task - doesn't use rubinius yet
Alexander Kellett authored
127 task :bfts do
128 system("ruby -Inative -Ibfts/overlay bfts/overlay/tc_all.rb")
129 end
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
130
f3da43a summary: test:nativebfts
Alexander Kellett authored
131 desc "Runs part of BFTS under Rubinius natively."
9446025 add code_cache dep to nativebfts also
Alexander Kellett authored
132 task :nativebfts => ['test:setup:code_cache'] do
ee10ad2 further file shuffles to decrease the complexities of the relative paths
Alexander Kellett authored
133 system("ruby -Ibfts/overlay bfts/overlay/test_stuff.rb")
f3da43a summary: test:nativebfts
Alexander Kellett authored
134 end
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
135
f3da43a summary: test:nativebfts
Alexander Kellett authored
136 desc "Run rubinius's 1.8.* tests."
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
137 task :core do
138 system("ruby -Ilib test/tc_all.rb")
139 end
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
140
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
141 desc "Run shotgun's core tests."
142 task :shotgun => ['test:setup:code_cache'] do
143 system("ruby test/tc_all.rb shotgun-tests")
144 end
145
146 namespace :setup do
147 desc "Prepare the code-cache directory"
e1683f8 @brixen updated rake task doc:contrib:easy. Added spec:setup:code_cache to cl…
brixen authored
148 task :code_cache => 'spec:setup:code_cache'
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
149 end
150 end
151
2299586 @evanphx Cleaned up the rake file post reorg
evanphx authored
152 desc "Build the whole project"
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
153 task :build => 'build:all'
154
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
155 desc "Rebuild all parts and archives from scratch."
156 task :rebuild => ['build:clean', 'build:delete_rbc', 'build:delete_rba', 'build:setup:syd',
157 'build:shotgun', 'build:bootstrap', 'build:core', 'build:library', 'build:compiler']
158
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
159 namespace :build do
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
160
2299586 @evanphx Cleaned up the rake file post reorg
evanphx authored
161 desc "Build rubinius (shotgun)."
7cd9d1e not perfect, but somewhat closer to reality
Cabo authored
162 task :all => ['build:clean', 'build:shotgun']
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
163
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
164 desc "Cleanup build files."
165 task :clean do
166 FileUtils.rm_rf 'code-cache'
167 FileUtils.rm Dir.glob('lib/kernel.rb*')
4c77303 @evanphx Make find exit cleanly
evanphx authored
168 sh "(find native -name '*.rbc' | xargs rm) || true"
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
169 Dir.chdir('shotgun') do
8322ab6 @brixen rake build should now work even when make clean fails.
brixen authored
170 sh 'make -e clean || true'
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
171 end
172 end
173
699b453 @evanphx Farewell jmpbuf.h, you were a bitch anyway. All hail PortableUContext!
evanphx authored
174 desc "Rebuild librubinius"
175 task :relib do
176 sh 'make -C shotgun/lib clean'
177 sh 'make'
178 end
179
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
180 task :configure do
181 system('./configure')
182 raise 'Failed to configure shotgun components' if $?.exitstatus != 0
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
183 end
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
184
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
185 task :setup do
186 sh "ruby bin/rcc"
187 end
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
188
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
189 namespace :setup do
190 desc "Ensure that the correct version of the sydparse gem is installed."
191 task :syd do
192 require 'rubygems'
193 begin
194 require_gem 'sydparse', '>= 1.2.1'
195 rescue Gem::LoadError
196 puts "\nYour system does not have the required sysparse gem installed...\n"
197 Rake::Task['syd'].invoke
198 raise "Gem 'sydparse' must be installed from externals/syd-parser/pkg directory. Then re-run 'rake build'."
199 end
200 end
201 end
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
202
7cd9d1e not perfect, but somewhat closer to reality
Cabo authored
203 task :fields => ['setup:syd'] do
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
204 $:.unshift "lib"
205 require 'types'
79bedbe Fix some hash functions and improve MRI compiliance - also added a ne…
Defn authored
206 fd = File.open("kernel/bootstrap/00auto_fields.rb", "w")
552e0c1 @evanphx A bunch of compiler fixes as well as the ability to install rubinius!
evanphx authored
207 hfd = File.open("kernel/hints", "w")
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
208 hints = {}
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
209 Rubinius::Types.each do |name, mod|
210 next if mod::TotalFields.size == 0
211 sname = mod.name.split("::").last
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
212 sub = {}
552e0c1 @evanphx A bunch of compiler fixes as well as the ability to install rubinius!
evanphx authored
213 hfd.puts sname
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
214 fd.puts "class #{sname}"
215 idx = 0
216 str = []
217 mod::TotalFields.each do |fel|
218 if fel == :instance_variables
219 fel = :__ivars__
220 end
552e0c1 @evanphx A bunch of compiler fixes as well as the ability to install rubinius!
evanphx authored
221 hfd.puts fel
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
222 sub["@#{fel}".to_sym] = idx
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
223 str << [":#{fel} => #{idx}"]
224 # fd.puts "index_accessor :#{fel}, #{idx}"
225 fd.puts " def #{fel}; Ruby.asm \"push self\\npush #{idx}\\nfetch_field\"; end"
226 idx += 1
227 end
552e0c1 @evanphx A bunch of compiler fixes as well as the ability to install rubinius!
evanphx authored
228 hfd.puts "!"
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
229 hints[sname] = sub
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
230 fd.puts " ivar_as_index #{str.join(", ")}"
231 fd.puts "end"
232 end
233 fd.close
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
234
552e0c1 @evanphx A bunch of compiler fixes as well as the ability to install rubinius!
evanphx authored
235 #require 'yaml'
236 #File.open("kernel/hints", "w") do |f|
237 # f << hints.to_yaml
238 #end
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
239 end
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
240
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
241 desc "Build shotgun C components."
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
242 task :shotgun => ['build:setup', 'spec:setup:code_cache', 'build:configure'] do
ffef2ca Allow environment variables to overide shotgun/lib/Makefile ones, by …
Frederick authored
243 system("make -e -C shotgun rubinius")
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
244 raise 'Failed to build shotgun components' if $?.exitstatus != 0
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
245 end
fbba2c6 @evanphx Fixed rakefile so that kernel/hints and 00auto_fields.rb are regenerated
evanphx authored
246
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
247 desc "Install rubinius"
248 task :install => 'build:shotgun' do
249 system("#{ENV['SUDO']} make install")
250 raise 'Failed to install rubinius' if $?.exitstatus != 0
251 end
252
fbba2c6 @evanphx Fixed rakefile so that kernel/hints and 00auto_fields.rb are regenerated
evanphx authored
253 FileList['lib/types/*.rb'].each do |src|
254 file 'kernel/hints' => src
255 end
256
257 file 'kernel/hints' do
258 puts "Building hints and fields..."
259 Rake::Task['build:fields'].invoke
260 end
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
261
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
262 def newer?(file, cmp)
263 File.exists?(cmp) and File.mtime(cmp) >= File.mtime(file)
264 end
265
2299586 @evanphx Cleaned up the rake file post reorg
evanphx authored
266 desc "Build the VM bootstrap archive."
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
267 task :bootstrap => 'kernel/hints' do
268 Dir.chdir "kernel" do
269 files = Dir["bootstrap/*.rb"].sort
270
271 changed = []
272 files.each do |file|
273 cmp = "#{file}c"
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
274 unless newer?(file, cmp) # File.exists?(cmp) and File.mtime(cmp) >= File.mtime(file)
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
275 changed << cmp
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
276 system "#{COMPILER} #{file}"
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
277 raise "Failed to compile #{file}" if $?.exitstatus != 0
278 end
279 file << "c"
280 end
281
282 File.open(".load_order.txt","w") do |f|
283 f.puts files.join("\n")
284 end
285
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
286 archive = "../runtime/bootstrap.rba"
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
287
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
288 if File.exists? archive
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
289 if changed.empty?
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
290 puts "No kernel/bootstrap files to update."
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
291 else
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
292 system "zip -u #{archive} .load_order.txt #{changed.join(' ')}"
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
293 end
294 else
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
295 system "zip #{archive} .load_order.txt #{files.join(' ')}"
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
296 end
297 end
298 end
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
299
2299586 @evanphx Cleaned up the rake file post reorg
evanphx authored
300 desc "Build the core classes and methods archive."
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
301 task :core => 'kernel/hints' do
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
302 files = nil
303 Dir.chdir("kernel") do
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
304 files = Dir["core/*.rb"].sort
305 files.delete "core/__loader.rb"
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
306
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
307 files << "core/__loader.rb"
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
308
309 changed = []
310 files.each do |file|
311 cmp = "#{file}c"
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
312 unless newer?(file, cmp) # File.exists?(cmp) and File.mtime(cmp) >= File.mtime(file)
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
313 changed << cmp
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
314 system "#{COMPILER} #{file}"
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
315 raise "Failed to compile #{file}" if $?.exitstatus != 0
316 end
317 file << "c"
318 end
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
319
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
320 File.open(".load_order.txt","w") do |f|
321 f.puts files.join("\n")
322 end
323
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
324 archive = "../runtime/core.rba"
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
325
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
326 if File.exists? archive
327 if changed.empty?
328 puts "No kernel/core files to update."
329 else
330 system "zip -u #{archive} .load_order.txt #{changed.join(' ')}"
331 end
332 else
333 system "zip #{archive} .load_order.txt #{files.join(' ')}"
334 end
335 end
336 end
337
338 desc "Build the standard library."
339 task :library do
340 Dir.chdir('library') do
341 files = Dir['**/*.rb']
342 changed = []
343 files.each do |file|
344 cmp = "#{file}c"
345 unless newer?(file, cmp)
346 changed << cmp
347 system "#{COMPILER} #{file}"
348 raise "Failed to compile #{file}" if $?.exitstatus != 0
349 end
350 file << 'c'
351 end
352
353 archive = "../runtime/library.rba"
354
355 if File.exists? archive
fbba2c6 @evanphx Fixed rakefile so that kernel/hints and 00auto_fields.rb are regenerated
evanphx authored
356 if changed.empty?
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
357 puts "No library files to update."
fbba2c6 @evanphx Fixed rakefile so that kernel/hints and 00auto_fields.rb are regenerated
evanphx authored
358 else
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
359 system "zip -u #{archive} #{changed.join(' ')}"
fbba2c6 @evanphx Fixed rakefile so that kernel/hints and 00auto_fields.rb are regenerated
evanphx authored
360 end
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
361 else
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
362 system "zip #{archive} #{files.join(' ')}"
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
363 end
364 end
365 end
366
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
367 desc "Build syd-parser."
368 task :syd do
369 puts "Building externals/syd-parser gem...\n"
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
370 Dir.chdir('externals/syd-parser')
371 system("rake gem")
372 raise 'Failed to build externals/syd-parser gem' if $?.exitstatus != 0
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
373 puts "\nNow do 'gem install externals/syd-parser/pkg/*.gem' as your gem superuser.\n\n"
374 end
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
375
39b763c @evanphx Fixed the rake tasks for the compiler and added more ignores
evanphx authored
376 namespace :compiler do
377 desc "Bootstrap the compiler."
378 task :bootstrap do
379 files = %w! bytecode/compiler bytecode/assembler bytecode/encoder
380 sexp/simple_processor translation/normalize translation/local_scoping
381 sexp/composite_processor translation/states sexp/exceptions
382 bytecode/primitive_names!
383
384 files.each do |name|
385 file = "#{name}.rb"
386 dir = File.dirname(file)
387 dest_dir = File.join("native", dir)
388 path = File.expand_path File.join("lib", file)
389 dest = File.join("native", file)
390 FileUtils.mkdir_p dest_dir
391 FileUtils.symlink path, dest rescue nil
392 Dir.chdir "native" do
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
393 sh "#{COMPILER} #{file}"
39b763c @evanphx Fixed the rake tasks for the compiler and added more ignores
evanphx authored
394 end
395 raise "Failed to compile #{dest}" if $?.exitstatus != 0
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
396 end
ca67813 @evanphx WOO! This commit marks the beginning of the self hosting era!
evanphx authored
397
39b763c @evanphx Fixed the rake tasks for the compiler and added more ignores
evanphx authored
398 extra = %w!bytecode/rubinius!
399 extra.each do |name|
400 Dir.chdir "native" do
a33c588 Processing for ihash nodes (implicit hashes in method calls.)
Eero Saynatkari authored
401 file = name + '.rb'
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
402 sh "#{COMPILER} #{name}.rb"
a33c588 Processing for ihash nodes (implicit hashes in method calls.)
Eero Saynatkari authored
403 end
404 raise "Failed to compile native/#{name}" if $?.exitstatus != 0
405 end
406 end
f83e9ee @brixen removed grammar.c from version control, added it to clean target. add…
brixen authored
407
39b763c @evanphx Fixed the rake tasks for the compiler and added more ignores
evanphx authored
408 desc "Package up the compiler"
409 task :package do
410 File.unlink "compiler.rba" rescue nil
411 Dir.chdir "native" do
412 sh "zip ../runtime/compiler.rba **/*.rbc"
413 end
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
414 end
415 end
416
39b763c @evanphx Fixed the rake tasks for the compiler and added more ignores
evanphx authored
417 desc "Bootstrap and package the compiler"
418 task :compiler => ['build:compiler:bootstrap', 'build:compiler:package']
419
f83e9ee @brixen removed grammar.c from version control, added it to clean target. add…
brixen authored
420 desc "Builds shotgun, kernel, and bootstraps the compiler"
3897c94 * Support for Floats in Sprintf
Hurdlea authored
421 task :rubinius => ['build:shotgun', 'build:bootstrap', 'build:core', 'build:library', 'build:compiler']
e8b73c6 @wilson * Added build:delete_rbc task to clean up all rbc files, everywhere.
wilson authored
422
423 desc "Delete all cached .rbc files"
424 task :delete_rbc do
425 FileList['**/*.rbc', '*.rbc', '/tmp/*.rbc'].each do |fn|
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
426 FileUtils.rm fn rescue nil
427 end
428 end
429
430 desc "Delete all compiled ruby archives"
431 task :delete_rba do
432 FileList['runtime/*.rba'].each do |fn|
433 FileUtils.rm fn rescue nil
e8b73c6 @wilson * Added build:delete_rbc task to clean up all rbc files, everywhere.
wilson authored
434 end
435 end
baae928 big updates to reporting stuff
Mae authored
436 end
b7db3df Further fixes to the completeness report raking
Cabo authored
437
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
438 namespace :rbx do
439 desc "Clean build products and all compiled ruby files"
440 task :clean => ['build:clean', 'build:delete_rbc', 'build:delete_rba']
441
442 desc "Build all components that need it, but don't clean first"
443 task :build do
444 ::COMPILER = 'rbx -c'
a41ff7c bracket for Rake::Task not parens
Amarkj authored
445 Rake::Task['build:all'].invoke
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
446 end
447
448 desc "Rebuilds everything after clean"
449 task :rebuild => ['rbx:clean', 'rbx:build', 'build:bootstrap',
450 'build:core', 'build:library', 'build:compiler']
451
452 task :install => ['rbx:build', 'build:install']
453 end
454
3e5e566 @brixen Added svn => svn:up which remove runtime/*.rba before svn up to elimi…
brixen authored
455 desc "Remove runtime/*.rba then svn up"
456 task :svn => 'svn:up'
457 namespace :svn do
458 desc "Remove runtime/*.rba then svn up"
459 task :up do
460 FileList['runtime/*.rba'].each do |f|
461 FileUtils.rm f
462 end
463 puts `svn up`
464
465 end
466 end
467
baae928 big updates to reporting stuff
Mae authored
468 task :report => 'report:all' # default
469 namespace :report do
b7db3df Further fixes to the completeness report raking
Cabo authored
470 desc "Build all reports"
4b4a582 fixed bug in Rakefile -- more fixes going into compare in a min
Mae authored
471 task :all => [:completeness, :rspec_errors]
baae928 big updates to reporting stuff
Mae authored
472
473 desc "Build completeness report"
a6682d1 added reports dir and also generated completeness.html to repo until …
Mae authored
474 task :completeness do
baae928 big updates to reporting stuff
Mae authored
475 run_report(:completeness)
476 end
477
ec5f703 created a report for tracking what is keeping shotgun from compiling …
Mae authored
478 desc "Build rspec errors report"
4b4a582 fixed bug in Rakefile -- more fixes going into compare in a min
Mae authored
479 task :rspec_errors do
2219843 added external: rspec 0.7.5 and added reporting for how broken it is
Mae authored
480 run_report(:rspec_errors)
481 end
482
ec5f703 created a report for tracking what is keeping shotgun from compiling …
Mae authored
483 desc "Build self-hosting errors report"
484 task :self_hosting_errors do
485 run_report(:self_hosting_errors)
486 end
487
baae928 big updates to reporting stuff
Mae authored
488 def run_report(name)
489 report = "#{ROOT}/bin/reports/#{name}.rb"
490 dest = "#{ROOT}/reports/#{name}.html"
491 File.open("#{ROOT}/reports/#{name}.html", 'w') do |f|
492 f.write `RUBYOPT='' ruby #{report}`
493 end
2219843 added external: rspec 0.7.5 and added reporting for how broken it is
Mae authored
494 puts "ruby #{report} > #{dest}"
baae928 big updates to reporting stuff
Mae authored
495 end
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
496 end
497
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
498 desc "Run Ruby 1.9.x benchmark suite"
499 task :bm do
500 sh "rbx benchmark/run.rb"
501 end
502 desc "Run Ruby 1.9.x benchmark suite"
503 task :benchmark => :bm
504
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
505 namespace :doc do
506 desc "Learn how to contribute."
507 task :contrib => 'doc:contrib:easy'
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
508
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
509 namespace :contrib do
510 desc "Find out about easy ways to contribute."
511 task :easy do
512 puts <<-EOM
e1683f8 @brixen updated rake task doc:contrib:easy. Added spec:setup:code_cache to cl…
brixen authored
513
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
514 The Rubinius team welcomes contributions, bug reports, test cases, and monetary support.
515 One possible way to help is:
e1683f8 @brixen updated rake task doc:contrib:easy. Added spec:setup:code_cache to cl…
brixen authored
516 1. Visit the wiki at http://rubini.us
517 2. Read up on writing RSpec specs for Rubinius.
518 3. Read up on implementing the Ruby core library.
519 4. Check if a spec exists for the method you are adding.
520 5. Red, green, refactor.
521 6. Submit a nice diff to the mailing list: http://groups.google.com/group/rubinius-devel
522 7. When your patch is accepted, ask Evan for a commit bit.
523
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
524 The 'ri' command is a rich source of examples and test cases.
e1683f8 @brixen updated rake task doc:contrib:easy. Added spec:setup:code_cache to cl…
brixen authored
525
526 There are a lot of folks working, so pop into #rubinius channel on freenode and ask
527 questions. Try to follow the conventions in the code and restrain impulses to go
528 mad refactoring and reorganizing until you are well familiar with the code and have
529 asked other's opinions. In the words of the venerable cabo: 'Primum non nocere'
530
531 Thanks for helping to spread good will among all beings. Go on, start coding!
532
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
533 EOM
534 end
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
535
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
536 desc "Find out about ways to contribute that may require a lot of knowledge or work."
537 task :hard do
538 puts "More to come. For now, just make everything work faster than anything else in the world."
539 end
540 end
541 end
542
543 namespace :svk do
544 task :push do
545 sh 'svk push --verbatim'
546 end
547 end
548
549 # Deprecated rake tasks
550 def deprecate(msg)
551 puts "Deprecated. Please use #{msg}."
552 end
553
554 desc "DEPRECATED: Run shotgun's core tests"
555 task :test_shotgun do
556 deprecate 'test:shotgun'
557 Rake::Task['test:shotgun'].invoke
558 end
559
560 desc "DEPRECATED: Run all the tests"
561 task :test_all do
562 deprecate 'test:all'
563 Rake::Task['test:all'].invoke
564 end
6a03730 @evanphx Cleaned up some of the includes and fixed up the Rakefile to run the …
evanphx authored
565
566 # This forces ruby inline to build everything in the
567 # right place.
568 task :setup do
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
569 deprecate 'build:setup'
570 Rake::Task['build:setup'].invoke
d4e9e90 @evanphx r93@vatu: evan | 2006-10-29 15:34:45 -0800
evanphx authored
571 end
572
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
573 desc "DEPRECATED: Build shotgun C components"
574 task :shotgun do
575 deprecate 'build:shotgun'
576 Rake::Task['build:shotgun'].invoke
f9924e3 @evanphx r53@vatu: evan | 2006-09-11 22:15:12 -0700
evanphx authored
577 end
578
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
579 desc "DEPRECATED: Prepare the code-cache directory"
bb76a4f @wilson Reorganized the Rakefile to make it easier to understand for first-ti…
wilson authored
580 task :code_cache do
c72dd91 Make rake code_cache point to the right task
Frederick authored
581 deprecate 'test:setup:code_cache'
582 Rake::Task['test:setup:code_cache'].invoke
bb76a4f @wilson Reorganized the Rakefile to make it easier to understand for first-ti…
wilson authored
583 end
6a03730 @evanphx Cleaned up some of the includes and fixed up the Rakefile to run the …
evanphx authored
584
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
585 desc "DEPRECATED: Ensure that the correct version of the sydparse gem is installed."
9107f2a @brixen Added ensure_syd task as dependency on build so that build will not c…
brixen authored
586 task :ensure_syd do
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
587 deprecate 'build:setup:syd'
588 Rake::Task['build:setup:syd'].invoke
9107f2a @brixen Added ensure_syd task as dependency on build so that build will not c…
brixen authored
589 end
590
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
591 desc "DEPRECATED: Build syd-parser."
a38f811 @evanphx r55@vatu: evan | 2006-09-11 22:33:54 -0700
evanphx authored
592 task :syd do
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
593 deprecate 'build:syd'
594 Rake::Task['build:syd'].invoke
a38f811 @evanphx r55@vatu: evan | 2006-09-11 22:33:54 -0700
evanphx authored
595 end
596
8dd2b6b @evanphx r43@vatu: evan | 2006-08-24 16:34:21 -0700
evanphx authored
597 task :fields do
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
598 deprecate 'build:fields'
599 Rake::Task['build:fields'].invoke
8dd2b6b @evanphx r43@vatu: evan | 2006-08-24 16:34:21 -0700
evanphx authored
600 end
601
bb76a4f @wilson Reorganized the Rakefile to make it easier to understand for first-ti…
wilson authored
602 # Combine the separate .rb files in lib into a single kernel.rb
8dd2b6b @evanphx r43@vatu: evan | 2006-08-24 16:34:21 -0700
evanphx authored
603 task :kernel do
2299586 @evanphx Cleaned up the rake file post reorg
evanphx authored
604 deprecate 'build:setup:core'
605 Rake::Task['build:core'].invoke
8dd2b6b @evanphx r43@vatu: evan | 2006-08-24 16:34:21 -0700
evanphx authored
606 end
607
bb76a4f @wilson Reorganized the Rakefile to make it easier to understand for first-ti…
wilson authored
608 # Build the kernel
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
609 task :bk do
2299586 @evanphx Cleaned up the rake file post reorg
evanphx authored
610 deprecate 'build:core'
611 Rake::Task['build:core'].invoke
cad84a5 @evanphx r69@vatu: evan | 2006-10-22 18:15:55 -0700
evanphx authored
612 end
613
1840a35 @brixen Added deprecated task br (e.g. invoke rake br) as an alias for build:…
brixen authored
614 # Build rubinius vm (i.e. shotgun, kernel, compiler bootstrap)
615 task :br do
616 deprecate 'build:rubinius'
617 Rake::Task['build:rubinius'].invoke
618 end
619
c3920f6 @evanphx r72@vatu: evan | 2006-10-24 18:31:21 -0700
evanphx authored
620 task :clean do
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
621 deprecate 'build:clean'
622 Rake::Task['build:clean'].invoke
c3920f6 @evanphx r72@vatu: evan | 2006-10-24 18:31:21 -0700
evanphx authored
623 end
624
6ffbd6e @evanphx The start of the cuby primitives. cuby primitives are not yet integra…
evanphx authored
625 task :push do
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
626 deprecate 'svk:push'
627 Rake::Task['svk:push'].invoke
6ffbd6e @evanphx The start of the cuby primitives. cuby primitives are not yet integra…
evanphx authored
628 end
629
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
630 desc "DEPRECATED: Alias for doc:contrib:easy."
73823df @brixen Added rake task to find low hanging fruit suggested by lypanov
brixen authored
631 task :find_low_hanging_fruit do
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
632 deprecate 'doc:contrib:easy'
633 Rake::Task['doc:contrib:easy'].invoke
73823df @brixen Added rake task to find low hanging fruit suggested by lypanov
brixen authored
634 end
635
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
636 # vim: syntax=ruby shiftwidth=2
Something went wrong with that request. Please try again.