Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 182 lines (146 sloc) 4.634 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
af5cae6 Brian Shirai Refuse to configure, build if RUBYLIB is set.
brixen authored
4 if ENV["RUBYLIB"]
5 STDERR.puts "ERROR: Please unset RUBYLIB to build Rubinius"
6 exit 1
7 end
8
1088784 Silence a rake warning
Jacqui Maher and Wilson Bilkovich authored
9 $trace ||= false
69a6063 Enable warnings for rake.
Tilman Sauerbeck authored
10 $VERBOSE = true
bdcf9cb Eero Saynatkari DEV is gone. See `rake build:help`. vm:test always uses debug flags.
rue authored
11 $verbose = Rake.application.options.trace || ARGV.delete("-v")
12
a352624 Start of new LLVM JIT
Evan Phoenix authored
13 if !$verbose and respond_to?(:verbose)
14 verbose(false) if verbose() == :default
15 end
16
9465976 Brian Shirai Generalize building with MRI 1.8/1.9 or rbx.
brixen authored
17 $:.unshift File.expand_path("../", __FILE__)
18
a632b48 Brian Shirai Added new rake install tasks.
brixen authored
19 config_rb = File.expand_path "../config.rb", __FILE__
20 config_h = File.expand_path "../vm/gen/config.h", __FILE__
21
22 unless File.exists?(config_rb) and File.exists?(config_h)
243a775 Brian Shirai Reworked configuring tasks.
brixen authored
23 STDERR.puts "Please run ./configure first"
24 exit 1
25 end
26
a632b48 Brian Shirai Added new rake install tasks.
brixen authored
27 require config_rb
28 BUILD_CONFIG = Rubinius::BUILD_CONFIG
0941eb2 Eric Hodel Add tasks to build .rba files
drbrain authored
29
58a50ec Brian Shirai Added experimental 2.0 support.
brixen authored
30 unless BUILD_CONFIG[:config_version] == 22
e846db9 Brian Shirai Ensure Rakefile checks configure version before anything. Closes #385.
brixen authored
31 STDERR.puts "Your configuration is outdated, please run ./configure first"
9465976 Brian Shirai Generalize building with MRI 1.8/1.9 or rbx.
brixen authored
32 exit 1
33 end
34
e846db9 Brian Shirai Ensure Rakefile checks configure version before anything. Closes #385.
brixen authored
35 # Yes, this is duplicated from the configure script for now.
36 unless BUILD_CONFIG[:which_ruby] == :ruby or BUILD_CONFIG[:which_ruby] == :rbx
37 STDERR.puts "Sorry, building Rubinius requires MRI or Rubinius"
84e1594 Brian Shirai Added config version to enable detecting stale configuration.
brixen authored
38 exit 1
39 end
40
a5aff42 Dirkjan Bussink Verify that the ruby to build with is the one it was configured with
dbussink authored
41 bin = RbConfig::CONFIG["RUBY_INSTALL_NAME"] || RbConfig::CONFIG["ruby_install_name"]
42 bin << (RbConfig::CONFIG['EXEEXT'] || RbConfig::CONFIG['exeext'] || '')
43 build_ruby = File.join(RbConfig::CONFIG['bindir'], bin)
44
45 unless BUILD_CONFIG[:build_ruby] == build_ruby
46 STDERR.puts "Sorry, but you need to build with the same Ruby version it was configured with"
47 STDERR.puts "Please run ./configure again"
48 exit 1
49 end
50
6b363a8 Brian Shirai Propagate --cc configure setting to CC, CXX env vars. Closes #520.
brixen authored
51 # Set the build compiler to the configured compiler unless
52 # the compiler is set via CC environment variable.
53 ENV['CC'] = BUILD_CONFIG[:compiler] unless ENV['CC']
54 ENV['CXX'] = BUILD_CONFIG[:compiler] unless ENV['CXX']
55
bd6aef7 Dirkjan Bussink Use RbConfig instead of Config
dbussink authored
56 $dlext = RbConfig::CONFIG["DLEXT"]
9ebee09 Brian Shirai Add mspec and spec rakelib files from master.
brixen authored
57
c4e6508 Brian Shirai Added spec, spec18, spec19 rake tasks.
brixen authored
58 def run_specs(flags=nil)
0c1fb8e Brian Shirai Make specs run from rake regardless of install config.
brixen authored
59 unless File.directory? BUILD_CONFIG[:runtime]
60 # Setting these enables the specs to run when rbx has been configured
61 # to be installed, but rake install has not been run yet.
62 ENV["RBX_RUNTIME"] = File.expand_path "../runtime", __FILE__
63 ENV["RBX_LIB"] = File.expand_path "../lib", __FILE__
64 ENV["CFLAGS"] = "-Ivm/capi"
65 end
66
c4e6508 Brian Shirai Added spec, spec18, spec19 rake tasks.
brixen authored
67 sh "bin/mspec ci #{ENV['CI_MODE_FLAG'] || flags} --background --agent"
68 end
69
70 task :default => %w[build vm:test] do
71 run_specs
2e737d7 Brian Shirai Removed rake spec commands. See rake spec for details.
brixen authored
72 end
8dd2b6b Evan Phoenix r43@vatu: evan | 2006-08-24 16:34:21 -0700
evanphx authored
73
bdcf9cb Eero Saynatkari DEV is gone. See `rake build:help`. vm:test always uses debug flags.
rue authored
74 # See vm.rake for more information
75 desc "Build everything that needs to be built at default level."
56edbca Add rdoc, rake, and rake-compiler and preinstalled gems
Evan Phoenix authored
76 task :build => ["build:normal", "gem_bootstrap"]
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
77
90ffc92 Eric Hodel Rip out irrelevant parts of the Rakefile
drbrain authored
78 desc "Recompile all ruby system files"
79 task :rebuild => %w[clean build]
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
80
5853d7f Brian Shirai Specific :ci18 and :ci19 tasks.
brixen authored
81 def run_ci
a8390a9 Add ci rake task
Evan Phoenix authored
82 unless system("rake -q")
83 puts "<< ERROR IN CI, CLEANING AND RERUNNING >>"
84 system "rake -q clean"
85 system "find . -name *.rbc -delete"
86 sh "rake -q"
87 end
88 end
89
5853d7f Brian Shirai Specific :ci18 and :ci19 tasks.
brixen authored
90 desc "Run CI in default (configured) mode"
91 task :ci do
92 run_ci
93 end
94
95 # These tasks run the specs in the specified mode regardless of
96 # the default mode with which Rubinius was configured.
97 desc "Run CI in 1.8 mode"
98 task :ci18 do
99 ENV['CI_MODE_FLAG'] = "-T -X19=no"
100 run_ci
101 end
102
103 desc "Run CI in 1.9 mode"
104 task :ci19 do
105 ENV['CI_MODE_FLAG'] = "-T -X19"
106 run_ci
107 end
108
58a50ec Brian Shirai Added experimental 2.0 support.
brixen authored
109 desc "Run CI in 2.0 mode"
110 task :ci20 do
111 ENV['CI_MODE_FLAG'] = "-T -X20"
112 run_ci
113 end
114
569fccd Eric Hodel Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake tas...
drbrain authored
115 desc 'Remove rubinius build files'
af222ee Eric Hodel Restore generation of ruby_config and rubinius_config, add clean rules
drbrain authored
116 task :clean => %w[
117 vm:clean
118 kernel:clean
119 clean:crap
9ed0630 Brian Shirai Reworked compiling C extensions.
brixen authored
120 extensions:clean
af222ee Eric Hodel Restore generation of ruby_config and rubinius_config, add clean rules
drbrain authored
121 ]
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
122
569fccd Eric Hodel Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake tas...
drbrain authored
123 desc 'Remove rubinius build files and external library build files'
af222ee Eric Hodel Restore generation of ruby_config and rubinius_config, add clean rules
drbrain authored
124 task :distclean => %w[
125 clean
126 vm:distclean
127 ]
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
128
569fccd Eric Hodel Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake tas...
drbrain authored
129 namespace :clean do
130 desc "Cleans up editor files and other misc crap"
131 task :crap do
132 files = (Dir["*~"] + Dir["**/*~"]).uniq
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
133
569fccd Eric Hodel Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake tas...
drbrain authored
134 rm_f files, :verbose => $verbose unless files.empty?
135 end
136 end
2e737d7 Brian Shirai Removed rake spec commands. See rake spec for details.
brixen authored
137
a632b48 Brian Shirai Added new rake install tasks.
brixen authored
138 desc 'Move the preinstalled gem setup into place'
139 task :gem_bootstrap do
140 unless File.directory?("gems/rubinius")
264af55 Fix preinstalled gems directory layout (version proof)
Evan Phoenix authored
141 sh "mkdir -p gems/rubinius"
142 sh "cp -r preinstalled-gems/bin gems/bin"
143 sh "cp -r preinstalled-gems/data gems/rubinius/preinstalled"
a632b48 Brian Shirai Added new rake install tasks.
brixen authored
144 end
145 end
146
df791c5 Brian Shirai Enable running docs site with bootstrap Ruby using 'rake docs'.
brixen authored
147 desc "Run the Rubinius documentation website"
148 task :docs do
149 require 'kernel/delta/options'
150 require 'rbconfig'
151 require 'webrick'
152 require 'lib/rubinius/documentation'
153
154 Rubinius::Documentation.main
155 end
156
c4e6508 Brian Shirai Added spec, spec18, spec19 rake tasks.
brixen authored
157 desc "Run the CI specs in 1.8 mode but do not rebuild on failure"
158 task :spec18 do
159 run_specs "-T -X19=no"
160 end
2e737d7 Brian Shirai Removed rake spec commands. See rake spec for details.
brixen authored
161
c4e6508 Brian Shirai Added spec, spec18, spec19 rake tasks.
brixen authored
162 desc "Run the CI specs in 1.9 mode but do not rebuild on failure"
163 task :spec19 do
164 run_specs "-T -X19"
165 end
2e737d7 Brian Shirai Removed rake spec commands. See rake spec for details.
brixen authored
166
58a50ec Brian Shirai Added experimental 2.0 support.
brixen authored
167 desc "Run the CI specs in 2.0 mode but do not rebuild on failure"
168 task :spec20 do
169 run_specs "-T -X20"
170 end
171
c4e6508 Brian Shirai Added spec, spec18, spec19 rake tasks.
brixen authored
172 desc "Run CI in default (configured) mode but do not rebuild on failure"
173 task :spec do
174 run_specs
2e737d7 Brian Shirai Removed rake spec commands. See rake spec for details.
brixen authored
175 end
580e56e Eero Saynatkari Add task :todos to do a simple grep for todo marks in kernel/.
rue authored
176
177 desc "Print list of items marked to-do in kernel/ (@todo|TODO)"
178 task :todos do
179 sh "grep", "-Rn", "@todo", "kernel"
180 sh "grep", "-Rn", "TODO", "kernel"
181 end
Something went wrong with that request. Please try again.