Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 242 lines (200 sloc) 6.059 kb
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
1 require 'rake/legacy_tasks'
d630d96 Rakefile now supports rake report:all which runs all of the reports. All...
Ryantm authored
2 require 'rake/rubinius_spec_tasks'
6e51eee Brian Shirai put guards on imcompatible specs to prevent ruby, jruby from running the...
brixen authored
3
d630d96 Rakefile now supports rake report:all which runs all of the reports. All...
Ryantm authored
4 task :default => :tasks
5
6 task :tasks do
7 puts `rake -T`
8 end
8dd2b6b Evan Phoenix r43@vatu: evan | 2006-08-24 16:34:21 -0700
evanphx authored
9
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
10 def newer?(file, cmp)
11 File.exists?(cmp) and File.mtime(cmp) >= File.mtime(file)
12 end
939f9ac Evan Phoenix Revert array changes back to r1088. r1089 is busted bigtime.
evanphx authored
13
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
14 def update_archive(files, archive, dir=nil)
939f9ac Evan Phoenix Revert array changes back to r1088. r1089 is busted bigtime.
evanphx authored
15 archive = File.expand_path(ENV['OUTPUT'] || archive)
e1683f8 Brian Shirai updated rake task doc:contrib:easy. Added spec:setup:code_cache to clear...
brixen authored
16
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
17 changed = []
18 files.each do |file|
19 cmp = "#{file}c"
939f9ac Evan Phoenix Revert array changes back to r1088. r1089 is busted bigtime.
evanphx authored
20 if !newer?(file, cmp)
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
21 changed << cmp
22 system "shotgun/rubinius compile #{file}"
939f9ac Evan Phoenix Revert array changes back to r1088. r1089 is busted bigtime.
evanphx authored
23 elsif !File.exists?(archive)
24 changed << cmp
6b9c27b Complete rspec coverage of subtend string compat to date.
Kev authored
25 end
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
26 file << "c"
e1683f8 Brian Shirai updated rake task doc:contrib:easy. Added spec:setup:code_cache to clear...
brixen authored
27 end
6b9c27b Complete rspec coverage of subtend string compat to date.
Kev authored
28
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
29 curdir = Dir.getwd
30 if dir
939f9ac Evan Phoenix Revert array changes back to r1088. r1089 is busted bigtime.
evanphx authored
31 Dir.chdir(dir)
32 changed.map! { |f| f.gsub(%r!^#{dir}/!, "") }
cdfdc27 Added my idea of a sanity check against MRI for compatibility purposes
Mae authored
33 end
086f889 * bin/specrunner is a small bash kludge for running mini_rspec over
Eero Saynatkari authored
34
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
35 File.open(".load_order.txt","w") do |f|
36 f.puts files.join("\n")
086f889 * bin/specrunner is a small bash kludge for running mini_rspec over
Eero Saynatkari authored
37 end
939f9ac Evan Phoenix Revert array changes back to r1088. r1089 is busted bigtime.
evanphx authored
38
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
39 if File.exists? archive
40 if changed.empty?
41 puts "No files to update."
42 else
43 system "zip -u #{archive} .load_order.txt #{changed.join(' ')}"
086f889 * bin/specrunner is a small bash kludge for running mini_rspec over
Eero Saynatkari authored
44 end
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
45 else
939f9ac Evan Phoenix Revert array changes back to r1088. r1089 is busted bigtime.
evanphx authored
46 system "zip #{archive} .load_order.txt #{changed.join(' ')}"
086f889 * bin/specrunner is a small bash kludge for running mini_rspec over
Eero Saynatkari authored
47 end
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
48
49 Dir.chdir(curdir) if dir
4d4f6fa Brian Shirai Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
50 end
51
6e51eee Brian Shirai put guards on imcompatible specs to prevent ruby, jruby from running the...
brixen authored
52 # spec tasks
03dfae6 Brian Shirai Added rake task spec:ci. added svn:executable for bin/mspec. enhanced re...
brixen authored
53 namespace :spec do
6e51eee Brian Shirai put guards on imcompatible specs to prevent ruby, jruby from running the...
brixen authored
54 namespace :setup do
55 desc "Setup for subtend examples"
56 task :subtend do
57 Dir[File.join(ROOT,"spec/subtend/**/Rakefile")].each do |rakefile|
58 sh "rake -f #{rakefile}"
59 end
60 end
61 end
62
63 desc "Run continuous integration examples"
03dfae6 Brian Shirai Added rake task spec:ci. added svn:executable for bin/mspec. enhanced re...
brixen authored
64 task :ci do
65 begin
66 stat = File.stat("CI-specs")
67 if stat.file?
68 raise "CI-specs is a file. Remove it to run CI specs"
69 elsif stat.directory?
70 sh "svn up CI-specs"
71 end
72 rescue
73 sh("svn co http://code.fallingsnow.net/svn/rubinius/branches/CI-specs")
74 end
75 sh "bin/mspec CI-specs"
76 end
6e51eee Brian Shirai put guards on imcompatible specs to prevent ruby, jruby from running the...
brixen authored
77
78 spec_targets = %w(compiler core incompatible language library parser rubinius)
79 # Build a spec:<task_name> for each group of Rubinius specs
80 spec_targets.each do |group|
81 desc "Run #{group} examples"
d08e789 Brian Shirai fixed typo. bad typo. that's a no.
brixen authored
82 task group do
6e51eee Brian Shirai put guards on imcompatible specs to prevent ruby, jruby from running the...
brixen authored
83 sh "bin/mspec spec/#{group}"
84 end
85 end
86
87 desc "Run subtend examples"
88 task :subtend => "spec:setup:subtend" do
89 sh "bin/mspec spec/subtend"
90 end
91
92 # Specdiffs to make it easier to see what your changes have affected :)
93 desc 'Run specs and produce a diff against current base'
94 task :diff => 'diff:run'
95
96 namespace :diff do
97 desc 'Run specs and produce a diff against current base'
98 task :run do
99 system 'bin/mspec spec > /tmp/rbs_specdiff'
100 system 'diff -u spec/diffs/base.txt /tmp/rbs_specdiff'
101 system 'rm /tmp/rbs_specdiff'
102 end
103
104 desc 'Replace the base spec file with a new one'
105 task :replace do
106 system 'bin/mspec spec > spec/diffs/base.txt'
107 end
108 end
d630d96 Rakefile now supports rake report:all which runs all of the reports. All...
Ryantm authored
109
110 task :r2r do
111 puts ARGV.inspect
112 end
03dfae6 Brian Shirai Added rake task spec:ci. added svn:executable for bin/mspec. enhanced re...
brixen authored
113 end
114
6e51eee Brian Shirai put guards on imcompatible specs to prevent ruby, jruby from running the...
brixen authored
115 # build tasks
116 desc "Completely rebuild everything"
117 task :rebuild => ['build:clean', 'build:shotgun', 'build:compiler', 'build:bootstrap', 'build:core', 'build:library']
118
119 desc "Build shotgun (the C-code VM)"
120 task :build => ['build:shotgun']
121
4d4f6fa Brian Shirai Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
122 namespace :build do
dd4b574 Evan Phoenix Merge from /branches/backtrace.
evanphx authored
123
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
124 desc "Removes build by-products for shotgun, compiler, and library"
125 task :clean => ['clean:shotgun', 'clean:compiler', 'clean:bootstrap', 'clean:core', 'clean:library']
dd4b574 Evan Phoenix Merge from /branches/backtrace.
evanphx authored
126
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
127 namespace :clean do
128 desc "Removes build by-products for shotgun"
129 task :shotgun do
685576c Ticket #80: Respect environment variables that influence the build proce...
Tilman authored
130 sh "make -C shotgun clean || true"
9463145 Brian Shirai Updates to Rakefile, added rbx namespace to compile with rbx instead of ...
brixen authored
131 end
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
132
133 desc "Removes build by-products for compiler"
134 task :compiler do
135 FileList['native/**/*.rbc', '/tmp/*.rbc'].each do |fn|
136 FileUtils.rm fn rescue nil
4d4f6fa Brian Shirai Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
137 end
138 end
fbba2c6 Evan Phoenix Fixed rakefile so that kernel/hints and 00auto_fields.rb are regenerated
evanphx authored
139
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
140 desc "Removes build by-products for library"
141 task :library do
142 FileList['library/**/*.rbc'].each do |fn|
143 FileUtils.rm fn rescue nil
5468980 Evan Phoenix kernel/ reorg! New functionality goes in kernel/core only. kernel.rba ha...
evanphx authored
144 end
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
145 end
5468980 Evan Phoenix kernel/ reorg! New functionality goes in kernel/core only. kernel.rba ha...
evanphx authored
146
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
147 desc "Removes build by-products for bootstrap"
148 task :bootstrap do
149 FileList['kernel/bootstrap/**/*.rbc'].each do |fn|
150 FileUtils.rm fn rescue nil
5468980 Evan Phoenix kernel/ reorg! New functionality goes in kernel/core only. kernel.rba ha...
evanphx authored
151 end
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
152 end
5468980 Evan Phoenix kernel/ reorg! New functionality goes in kernel/core only. kernel.rba ha...
evanphx authored
153
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
154 desc "Removes build by-products for core"
155 task :core do
156 FileList['kernel/core/**/*.rbc'].each do |fn|
157 FileUtils.rm fn rescue nil
5468980 Evan Phoenix kernel/ reorg! New functionality goes in kernel/core only. kernel.rba ha...
evanphx authored
158 end
159 end
160 end
404f8ab Don't call configure on build:shotgun everytime.
Tilman authored
161
162 file "shotgun/config.h" do
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
163 sh "./configure"
164 raise 'Failed to configure Rubinius' unless $?.success?
3751f33 Evan Phoenix * Reworked the Rakefile to build the compiler by detection, like bootstr...
evanphx authored
165 end
166
404f8ab Don't call configure on build:shotgun everytime.
Tilman authored
167 task :configure => ["shotgun/config.h"] do
168 end
169
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
170 desc "Compiles shotgun (the C-code VM)"
171 task :shotgun => :configure do
685576c Ticket #80: Respect environment variables that influence the build proce...
Tilman authored
172 sh "make"
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
173 raise 'Failed to build shotgun' unless $?.success?
34ad791 * Disabled Lightning's dissembler on amd64
Eero Saynatkari authored
174 end
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
175
176 desc "Compiles the Rubinius bootstrap archive"
177 task :bootstrap do
178 files = Dir["kernel/bootstrap/*.rb"].sort
179 update_archive files, 'runtime/bootstrap.rba'
9463145 Brian Shirai Updates to Rakefile, added rbx namespace to compile with rbx instead of ...
brixen authored
180 end
34ad791 * Disabled Lightning's dissembler on amd64
Eero Saynatkari authored
181
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
182 desc "Compiles the Rubinius core archive"
3751f33 Evan Phoenix * Reworked the Rakefile to build the compiler by detection, like bootstr...
evanphx authored
183 task :core do
34ad791 * Disabled Lightning's dissembler on amd64
Eero Saynatkari authored
184 files = Dir["kernel/core/*.rb"].sort
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
185 files.delete("kernel/core/__loader.rb")
34ad791 * Disabled Lightning's dissembler on amd64
Eero Saynatkari authored
186 files << "kernel/core/__loader.rb"
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
187 update_archive files, 'runtime/core.rba'
34ad791 * Disabled Lightning's dissembler on amd64
Eero Saynatkari authored
188 end
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
189
190 desc "Compiles the Rubinius library archive"
9463145 Brian Shirai Updates to Rakefile, added rbx namespace to compile with rbx instead of ...
brixen authored
191 task :library do
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
192 files = Dir["library/**/*.rb"].sort
193 update_archive files, 'runtime/library.rba'
4d4f6fa Brian Shirai Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
194 end
2ff0f11 Brian Shirai added Andrew Thompson's Rakefile patches to catch errors in compilation ...
brixen authored
195
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
196 desc "Compiles the Rubinius compiler archive"
3751f33 Evan Phoenix * Reworked the Rakefile to build the compiler by detection, like bootstr...
evanphx authored
197 task :compiler do
198 files = %w! bytecode/compiler bytecode/assembler bytecode/encoder
199 sexp/simple_processor translation/normalize translation/local_scoping
200 sexp/composite_processor translation/states sexp/exceptions
201 bytecode/primitive_names !
ca67813 Evan Phoenix WOO! This commit marks the beginning of the self hosting era!
evanphx authored
202
3751f33 Evan Phoenix * Reworked the Rakefile to build the compiler by detection, like bootstr...
evanphx authored
203 paths = []
204
205 files.each do |name|
206 file = "#{name}.rb"
207 dir = File.dirname(file)
208 dest_dir = File.join("native", dir)
209 path = File.expand_path File.join("lib", file)
210 dest = File.join("native", file)
211 FileUtils.mkdir_p dest_dir
212 FileUtils.symlink path, dest rescue nil
213
214 paths << dest
dd4b574 Evan Phoenix Merge from /branches/backtrace.
evanphx authored
215 end
3751f33 Evan Phoenix * Reworked the Rakefile to build the compiler by detection, like bootstr...
evanphx authored
216
217 paths += %w!native/bytecode/rubinius.rb native/bytecode/system_hints.rb!
939f9ac Evan Phoenix Revert array changes back to r1088. r1089 is busted bigtime.
evanphx authored
218
219 update_archive paths, 'runtime/compiler.rba', "native"
e8b73c6 Wilson Bilkovich * Added build:delete_rbc task to clean up all rbc files, everywhere.
wilson authored
220 end
baae928 big updates to reporting stuff
Mae authored
221 end
b7db3df Further fixes to the completeness report raking
Cabo authored
222
9e24421 Wilson Bilkovich * Use a random pivot point for better worst-case Array#sort performance
wilson authored
223 desc "Remove all .rbc files from the project"
224 task :pristine do
225 FileList['**/*.rbc'].each do |fn|
226 FileUtils.rm fn rescue nil
227 end
228 end
229
6e51eee Brian Shirai put guards on imcompatible specs to prevent ruby, jruby from running the...
brixen authored
230 # svn tasks
3e5e566 Brian Shirai Added svn => svn:up which remove runtime/*.rba before svn up to eliminat...
brixen authored
231 desc "Remove runtime/*.rba then svn up"
232 task :svn => 'svn:up'
233 namespace :svn do
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
234 desc "Revert runtime/*.rba then svn up"
3e5e566 Brian Shirai Added svn => svn:up which remove runtime/*.rba before svn up to eliminat...
brixen authored
235 task :up do
d630d96 Rakefile now supports rake report:all which runs all of the reports. All...
Ryantm authored
236 sh "svn revert reports/*.html"
dc16b49 Wilson Bilkovich * Near-total rewrite of the Rakefile. Tasks that use rcompile are in the...
wilson authored
237 sh "svn revert runtime/*.rba"
3e5e566 Brian Shirai Added svn => svn:up which remove runtime/*.rba before svn up to eliminat...
brixen authored
238 puts `svn up`
baae928 big updates to reporting stuff
Mae authored
239 end
4d4f6fa Brian Shirai Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
240 end
241
Something went wrong with that request. Please try again.