Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 159 lines (118 sloc) 3.956 kb
90c05c1 @drbrain Update INSTALL to latest information.
drbrain authored
1 # NOTE! When updating this file, also update INSTALL, if necessary.
a8bdc6b @evanphx Cleanup / reorganize Rakefile
evanphx authored
2 # NOTE! Please keep your tasks grouped together.
90c05c1 @drbrain Update INSTALL to latest information.
drbrain authored
3
1088784 Silence a rake warning
Jacqui Maher and Wilson Bilkovich authored
4 $trace ||= false
69a6063 Enable warnings for rake.
Tilman Sauerbeck authored
5 $VERBOSE = true
bdcf9cb @rue DEV is gone. See `rake build:help`. vm:test always uses debug flags.
rue authored
6 $verbose = Rake.application.options.trace || ARGV.delete("-v")
7
a352624 Start of new LLVM JIT
Evan Phoenix authored
8 if !$verbose and respond_to?(:verbose)
9 verbose(false) if verbose() == :default
10 end
11
9465976 @brixen Generalize building with MRI 1.8/1.9 or rbx.
brixen authored
12 $:.unshift File.expand_path("../", __FILE__)
13
a632b48 @brixen Added new rake install tasks.
brixen authored
14 config_rb = File.expand_path "../config.rb", __FILE__
15 config_h = File.expand_path "../vm/gen/config.h", __FILE__
16
17 unless File.exists?(config_rb) and File.exists?(config_h)
243a775 @brixen Reworked configuring tasks.
brixen authored
18 STDERR.puts "Please run ./configure first"
19 exit 1
20 end
21
a632b48 @brixen Added new rake install tasks.
brixen authored
22 require config_rb
23 BUILD_CONFIG = Rubinius::BUILD_CONFIG
0941eb2 @drbrain Add tasks to build .rba files
drbrain authored
24
f29f8fd @brixen Added configure check for sizeof(long).
brixen authored
25 unless BUILD_CONFIG[:config_version] == 13
e846db9 @brixen Ensure Rakefile checks configure version before anything. Closes #385.
brixen authored
26 STDERR.puts "Your configuration is outdated, please run ./configure first"
9465976 @brixen Generalize building with MRI 1.8/1.9 or rbx.
brixen authored
27 exit 1
28 end
29
e846db9 @brixen Ensure Rakefile checks configure version before anything. Closes #385.
brixen authored
30 # Yes, this is duplicated from the configure script for now.
31 unless BUILD_CONFIG[:which_ruby] == :ruby or BUILD_CONFIG[:which_ruby] == :rbx
32 STDERR.puts "Sorry, building Rubinius requires MRI or Rubinius"
84e1594 @brixen Added config version to enable detecting stale configuration.
brixen authored
33 exit 1
34 end
35
bd6aef7 @dbussink Use RbConfig instead of Config
dbussink authored
36 $dlext = RbConfig::CONFIG["DLEXT"]
9ebee09 @brixen Add mspec and spec rakelib files from master.
brixen authored
37
2e737d7 @brixen Removed rake spec commands. See rake spec for details.
brixen authored
38 task :default => %w[build vm:test] do
0c1fb8e @brixen Make specs run from rake regardless of install config.
brixen authored
39 unless File.directory? BUILD_CONFIG[:runtime]
40 # Setting these enables the specs to run when rbx has been configured
41 # to be installed, but rake install has not been run yet.
42 ENV["RBX_RUNTIME"] = File.expand_path "../runtime", __FILE__
43 ENV["RBX_LIB"] = File.expand_path "../lib", __FILE__
44 ENV["CFLAGS"] = "-Ivm/capi"
45 end
46
3015b80 Add and use --agent to mspec
Evan Phoenix authored
47 sh "bin/mspec ci --background --agent"
2e737d7 @brixen Removed rake spec commands. See rake spec for details.
brixen authored
48 end
8dd2b6b @evanphx r43@vatu: evan | 2006-08-24 16:34:21 -0700
evanphx authored
49
bdcf9cb @rue DEV is gone. See `rake build:help`. vm:test always uses debug flags.
rue authored
50 # See vm.rake for more information
51 desc "Build everything that needs to be built at default level."
56edbca Add rdoc, rake, and rake-compiler and preinstalled gems
Evan Phoenix authored
52 task :build => ["build:normal", "gem_bootstrap"]
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
53
90ffc92 @drbrain Rip out irrelevant parts of the Rakefile
drbrain authored
54 desc "Recompile all ruby system files"
55 task :rebuild => %w[clean build]
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
56
a8390a9 Add ci rake task
Evan Phoenix authored
57 desc "Use to run Rubinius in CI"
58 task :ci do
59 unless system("rake -q")
60 puts "<< ERROR IN CI, CLEANING AND RERUNNING >>"
61 system "rake -q clean"
62 system "find . -name *.rbc -delete"
63 sh "rake -q"
64 end
65 end
66
569fccd @drbrain Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake …
drbrain authored
67 desc 'Remove rubinius build files'
af222ee @drbrain Restore generation of ruby_config and rubinius_config, add clean rules
drbrain authored
68 task :clean => %w[
69 vm:clean
70 kernel:clean
71 clean:crap
9ed0630 @brixen Reworked compiling C extensions.
brixen authored
72 extensions:clean
af222ee @drbrain Restore generation of ruby_config and rubinius_config, add clean rules
drbrain authored
73 ]
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
74
569fccd @drbrain Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake …
drbrain authored
75 desc 'Remove rubinius build files and external library build files'
af222ee @drbrain Restore generation of ruby_config and rubinius_config, add clean rules
drbrain authored
76 task :distclean => %w[
77 clean
78 vm:distclean
79 ]
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
80
569fccd @drbrain Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake …
drbrain authored
81 namespace :clean do
82 desc "Cleans up editor files and other misc crap"
83 task :crap do
84 files = (Dir["*~"] + Dir["**/*~"]).uniq
1ce3d9b Reduced Rakefile to a minimally working version
Ryan Davis authored
85
569fccd @drbrain Move vm/Rakefile to rakelib/vm.rake, integrate it into the base rake …
drbrain authored
86 rm_f files, :verbose => $verbose unless files.empty?
87 end
88 end
2e737d7 @brixen Removed rake spec commands. See rake spec for details.
brixen authored
89
a632b48 @brixen Added new rake install tasks.
brixen authored
90 desc 'Move the preinstalled gem setup into place'
91 task :gem_bootstrap do
92 unless File.directory?("gems/rubinius")
264af55 Fix preinstalled gems directory layout (version proof)
Evan Phoenix authored
93 sh "mkdir -p gems/rubinius"
94 sh "cp -r preinstalled-gems/bin gems/bin"
95 sh "cp -r preinstalled-gems/data gems/rubinius/preinstalled"
a632b48 @brixen Added new rake install tasks.
brixen authored
96 end
97 end
98
2e737d7 @brixen Removed rake spec commands. See rake spec for details.
brixen authored
99 desc "Documents why no spec tasks exist"
100 task :spec do
101 puts <<-EOM
102
103 The spec and spec:xxx commands are deprecated (and removed).
ea5bf64 @mernen s/psuedo/pseudo/
mernen authored
104 Use bin/mspec directly. MSpec provides 'pseudo-directories',
2e737d7 @brixen Removed rake spec commands. See rake spec for details.
brixen authored
105 which are labels that refer to sets of specs to run. Refer
106 to spec/default.mspec, spec/full.mspec and the MSpec docs
107 for full details.
108
109 The following are likely scenarios for running the specs.
110 Unless -t <target> is passed to mspec, bin/rbx is run.
111
112 Run the CI specs that are run with the default 'rake' command
113
114 bin/mspec ci
115
116 Run _all_ the CI spec:
117
118 bin/mspec ci -B full
119
120 Run all the frozen specs:
121
122 bin/mspec
123
124 Run all the frozen Array specs:
125
126 bin/mspec core/array
127 OR
128 bin/mspec spec/frozen/core/array
129
130 Run spec/frozen/core/array/append_spec.rb:
131
132 bin/mspec core/array/append
133 OR
134 bin/mspec spec/frozen/core/array/append_spec.rb
135
136 Run all the compiler specs:
137
138 bin/mspec :compiler
139
140 Run all the [language, core, library, capi] specs:
141
142 bin/mspec :language
143 bin/mspec :core
144 ...
145
146 Run all the spec/ruby specs using the MRI on your path
147 (assuming you have run 'rake rubyspec:update'):
148
149 bin/mspec -tr :ruby
150
151 EOM
152 end
580e56e @rue Add task :todos to do a simple grep for todo marks in kernel/.
rue authored
153
154 desc "Print list of items marked to-do in kernel/ (@todo|TODO)"
155 task :todos do
156 sh "grep", "-Rn", "@todo", "kernel"
157 sh "grep", "-Rn", "TODO", "kernel"
158 end
Something went wrong with that request. Please try again.