Permalink
Browse files

Build Rubinius file system location independent.

  • Loading branch information...
1 parent d0b1d0f commit 7862130ba9a2a54306587330f18f76268e77656c @brixen brixen committed Jul 12, 2012
Showing with 612 additions and 402 deletions.
  1. +1 −1 .gitignore
  2. +25 −29 Rakefile
  3. +0 −1 bin/gem
  4. +0 −1 bin/irb
  5. +0 −1 bin/rake
  6. +0 −1 bin/rbx
  7. +0 −10 bin/rbx-build
  8. +0 −1 bin/rdoc
  9. +0 −1 bin/ri
  10. +0 −1 bin/ruby
  11. +128 −71 configure
  12. +1 −19 kernel/loader.rb
  13. +3 −5 lib/rbconfig.rb
  14. +46 −34 rakelib/extensions.rake
  15. +29 −0 rakelib/gems.rake
  16. +181 −113 rakelib/install.rake
  17. +3 −4 rakelib/kernel.rake
  18. +16 −0 rakelib/vm.rake
  19. +1 −55 vm/agent.cpp
  20. +19 −31 vm/drivers/cli.cpp
  21. +116 −13 vm/environment.cpp
  22. +15 −1 vm/environment.hpp
  23. +28 −9 vm/ontology.cpp
View
@@ -48,6 +48,7 @@ tmtags
/lib/site
/share
/work
+/staging
# ignore gems and commands installed by gems
/gems/*
@@ -63,7 +64,6 @@ tmtags
!/bin/mkspec
!/bin/mspec
!/bin/prof.rb
-!/bin/rbx
# don't ignore spec/tags
!/spec/tags
View
@@ -33,7 +33,7 @@ end
require config_rb
BUILD_CONFIG = Rubinius::BUILD_CONFIG
-unless BUILD_CONFIG[:config_version] == 158
+unless BUILD_CONFIG[:config_version] == 159
STDERR.puts "Your configuration is outdated, please run ./configure first"
exit 1
end
@@ -44,6 +44,14 @@ unless BUILD_CONFIG[:which_ruby] == :ruby or BUILD_CONFIG[:which_ruby] == :rbx
exit 1
end
+def libprefixdir
+ if BUILD_CONFIG[:stagingdir]
+ "#{BUILD_CONFIG[:stagingdir]}#{BUILD_CONFIG[:libdir]}"
+ else
+ "#{BUILD_CONFIG[:sourcedir]}/lib"
+ end
+end
+
# Records the full path to the ruby executable that runs this configure
# script. That path will be made available to the rest of the build system
# so the same version of ruby is invoked as needed.
@@ -93,6 +101,10 @@ class SpecRunner
@at_exit_handler_set = false
@at_exit_status = 0
+ def self.at_exit_status
+ @at_exit_status
+ end
+
def self.set_at_exit_handler
return if @at_exit_handler_set
@@ -105,7 +117,7 @@ class SpecRunner
end
def initialize
- unless File.directory? BUILD_CONFIG[:runtime]
+ unless File.directory? BUILD_CONFIG[:runtimedir]
# Setting these enables the specs to run when rbx has been configured
# to be installed, but rake install has not been run yet.
ENV["RBX_RUNTIME"] = File.expand_path "../runtime", __FILE__
@@ -127,7 +139,15 @@ class SpecRunner
end
end
-task :default => :spec
+if BUILD_CONFIG[:stagingdir]
+ task :default => [:spec, :check_status, :install]
+else
+ task :default => :spec
+end
+
+task :check_status do
+ exit unless SpecRunner.at_exit_status == 0
+end
task :github do
cur = `git config remote.origin.url`.strip
@@ -141,8 +161,8 @@ task :github do
end
# See vm.rake for more information
-desc "Build everything that needs to be built at default level."
-task :build => ["build:build", "gem_bootstrap"]
+desc "Build Rubinius"
+task :build => %w[build:build gems:install]
desc "Recompile all ruby system files"
task :rebuild => %w[clean build]
@@ -204,30 +224,6 @@ namespace :clean do
end
end
-desc 'Install the pre-installed gems'
-task :gem_bootstrap do
- STDOUT.puts "Installing pre-installed gems..."
- ENV['GEM_HOME'] = ENV['GEM_PATH'] = nil
-
- rbx = "#{BUILD_CONFIG[:bindir]}/#{BUILD_CONFIG[:program_name]}"
- gems = Dir["preinstalled-gems/*.gem"]
- options = "--local --conservative --ignore-dependencies --no-rdoc --no-ri"
-
- BUILD_CONFIG[:version_list].each do |ver|
- gems.each do |gem|
- parts = File.basename(gem, ".gem").split "-"
- gem_name = parts[0..-2].join "-"
- gem_version = parts[-1]
-
- system "#{rbx} -X#{ver} -S gem query --name-matches #{gem_name} --installed --version #{gem_version} > #{DEV_NULL}"
-
- unless $?.success?
- sh "#{rbx} -X#{ver} -S gem install #{options} #{gem}"
- end
- end
- end
-end
-
desc "Run the Rubinius documentation website"
task :docs do
require 'kernel/delta/options'
View
View
View
View
View
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-BIN_DIR=$(dirname $0)
-BASE_DIR=$(dirname $BIN_DIR)
-
-export RBX_RUNTIME="$BASE_DIR/runtime"
-export RBX_LIB="$BASE_DIR/lib"
-export RBX_CAPI_DIR=$BASE_DIR
-
-exec $BIN_DIR/../vm/vm "$*"
View
View
1 bin/ri
View
Oops, something went wrong.

0 comments on commit 7862130

Please sign in to comment.