Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 158 lines (129 sloc) 4.062 kB
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
1 require 'rake/rubinius_spec_tasks'
2 require 'rake/legacy_tasks'
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
3 task :default => :spec
8dd2b6b @evanphx r43@vatu: evan | 2006-08-24 16:34:21 -0700
evanphx authored
4
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
5 def newer?(file, cmp)
6 File.exists?(cmp) and File.mtime(cmp) >= File.mtime(file)
7 end
8 def update_archive(files, archive, dir=nil)
9 archive = File.expand_path archive
e1683f8 @brixen updated rake task doc:contrib:easy. Added spec:setup:code_cache to cl…
brixen authored
10
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
11 changed = []
12 files.each do |file|
13 cmp = "#{file}c"
14 unless newer?(file, cmp)
15 changed << cmp
16 system "shotgun/rubinius compile #{file}"
6b9c27b Complete rspec coverage of subtend string compat to date.
Kev authored
17 end
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
18 file << "c"
e1683f8 @brixen updated rake task doc:contrib:easy. Added spec:setup:code_cache to cl…
brixen authored
19 end
6b9c27b Complete rspec coverage of subtend string compat to date.
Kev authored
20
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
21 curdir = Dir.getwd
22 if dir
23 Dir.chdir(dir)
24 changed.map! { |f| f.gsub!(%r!^#{dir}/!, "") }
cdfdc27 Added my idea of a sanity check against MRI for compatibility purposes
Mae authored
25 end
086f889 * bin/specrunner is a small bash kludge for running mini_rspec over
Eero Saynatkari authored
26
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
27 File.open(".load_order.txt","w") do |f|
28 f.puts files.join("\n")
086f889 * bin/specrunner is a small bash kludge for running mini_rspec over
Eero Saynatkari authored
29 end
30
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
31 if File.exists? archive
32 if changed.empty?
33 puts "No files to update."
34 else
35 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
36 end
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
37 else
38 system "zip #{archive} .load_order.txt #{files.join(' ')}"
086f889 * bin/specrunner is a small bash kludge for running mini_rspec over
Eero Saynatkari authored
39 end
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
40
41 Dir.chdir(curdir) if dir
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
42 end
43
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
44 desc "Completely rebuild everything"
45 task :rebuild => ['build:clean', 'build:shotgun', 'build:compiler', 'build:bootstrap', 'build:core', 'build:library']
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
46
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
47 desc "Build shotgun (the C-code VM)"
48 task :build => ['build:shotgun']
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
49
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
50 namespace :build do
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
51
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
52 desc "Removes build by-products for shotgun, compiler, and library"
53 task :clean => ['clean:shotgun', 'clean:compiler', 'clean:bootstrap', 'clean:core', 'clean:library']
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
54
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
55 namespace :clean do
56 desc "Removes build by-products for shotgun"
57 task :shotgun do
58 sh "make -e -C shotgun clean || true"
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
59 end
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
60
61 desc "Removes build by-products for compiler"
62 task :compiler do
63 FileList['native/**/*.rbc', '/tmp/*.rbc'].each do |fn|
64 FileUtils.rm fn rescue nil
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
65 end
66 end
fbba2c6 @evanphx Fixed rakefile so that kernel/hints and 00auto_fields.rb are regenerated
evanphx authored
67
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
68 desc "Removes build by-products for library"
69 task :library do
70 FileList['library/**/*.rbc'].each do |fn|
71 FileUtils.rm fn rescue nil
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
72 end
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
73 end
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
74
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
75 desc "Removes build by-products for bootstrap"
76 task :bootstrap do
77 FileList['kernel/bootstrap/**/*.rbc'].each do |fn|
78 FileUtils.rm fn rescue nil
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
79 end
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
80 end
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
81
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
82 desc "Removes build by-products for core"
83 task :core do
84 FileList['kernel/core/**/*.rbc'].each do |fn|
85 FileUtils.rm fn rescue nil
5468980 @evanphx kernel/ reorg! New functionality goes in kernel/core only. kernel.rba…
evanphx authored
86 end
87 end
88 end
34ad791 * Disabled Lightning's dissembler on amd64
Eero Saynatkari authored
89
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
90 task :configure do
91 sh "./configure"
92 raise 'Failed to configure Rubinius' unless $?.success?
3751f33 @evanphx * Reworked the Rakefile to build the compiler by detection, like boot…
evanphx authored
93 end
94
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
95 desc "Compiles shotgun (the C-code VM)"
96 task :shotgun => :configure do
97 sh "make -e"
98 raise 'Failed to build shotgun' unless $?.success?
34ad791 * Disabled Lightning's dissembler on amd64
Eero Saynatkari authored
99 end
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
100
101 desc "Compiles the Rubinius bootstrap archive"
102 task :bootstrap do
103 files = Dir["kernel/bootstrap/*.rb"].sort
104 update_archive files, 'runtime/bootstrap.rba'
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
105 end
34ad791 * Disabled Lightning's dissembler on amd64
Eero Saynatkari authored
106
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
107 desc "Compiles the Rubinius core archive"
3751f33 @evanphx * Reworked the Rakefile to build the compiler by detection, like boot…
evanphx authored
108 task :core do
34ad791 * Disabled Lightning's dissembler on amd64
Eero Saynatkari authored
109 files = Dir["kernel/core/*.rb"].sort
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
110 files.delete("kernel/core/__loader.rb")
34ad791 * Disabled Lightning's dissembler on amd64
Eero Saynatkari authored
111 files << "kernel/core/__loader.rb"
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
112 update_archive files, 'runtime/core.rba'
34ad791 * Disabled Lightning's dissembler on amd64
Eero Saynatkari authored
113 end
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
114
115 desc "Compiles the Rubinius library archive"
9463145 @brixen Updates to Rakefile, added rbx namespace to compile with rbx instead …
brixen authored
116 task :library do
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
117 files = Dir["library/**/*.rb"].sort
118 update_archive files, 'runtime/library.rba'
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
119 end
2ff0f11 @brixen added Andrew Thompson's Rakefile patches to catch errors in compilati…
brixen authored
120
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
121 desc "Compiles the Rubinius compiler archive"
3751f33 @evanphx * Reworked the Rakefile to build the compiler by detection, like boot…
evanphx authored
122 task :compiler do
123 files = %w! bytecode/compiler bytecode/assembler bytecode/encoder
124 sexp/simple_processor translation/normalize translation/local_scoping
125 sexp/composite_processor translation/states sexp/exceptions
126 bytecode/primitive_names !
ca67813 @evanphx WOO! This commit marks the beginning of the self hosting era!
evanphx authored
127
3751f33 @evanphx * Reworked the Rakefile to build the compiler by detection, like boot…
evanphx authored
128 paths = []
129
130 files.each do |name|
131 file = "#{name}.rb"
132 dir = File.dirname(file)
133 dest_dir = File.join("native", dir)
134 path = File.expand_path File.join("lib", file)
135 dest = File.join("native", file)
136 FileUtils.mkdir_p dest_dir
137 FileUtils.symlink path, dest rescue nil
138
139 paths << dest
dd4b574 @evanphx Merge from /branches/backtrace.
evanphx authored
140 end
3751f33 @evanphx * Reworked the Rakefile to build the compiler by detection, like boot…
evanphx authored
141
142 paths += %w!native/bytecode/rubinius.rb native/bytecode/system_hints.rb!
143
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
144 update_archive paths, "runtime/compiler.rba", "native"
e8b73c6 @wilson * Added build:delete_rbc task to clean up all rbc files, everywhere.
wilson authored
145 end
baae928 big updates to reporting stuff
Mae authored
146 end
b7db3df Further fixes to the completeness report raking
Cabo authored
147
3e5e566 @brixen Added svn => svn:up which remove runtime/*.rba before svn up to elimi…
brixen authored
148 desc "Remove runtime/*.rba then svn up"
149 task :svn => 'svn:up'
150 namespace :svn do
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
151 desc "Revert runtime/*.rba then svn up"
3e5e566 @brixen Added svn => svn:up which remove runtime/*.rba before svn up to elimi…
brixen authored
152 task :up do
dc16b49 @wilson * Near-total rewrite of the Rakefile. Tasks that use rcompile are in …
wilson authored
153 sh "svn revert runtime/*.rba"
3e5e566 @brixen Added svn => svn:up which remove runtime/*.rba before svn up to elimi…
brixen authored
154 puts `svn up`
baae928 big updates to reporting stuff
Mae authored
155 end
4d4f6fa @brixen Added namespaces to the Rakefile with aliases to the old tasks.
brixen authored
156 end
157
Something went wrong with that request. Please try again.