diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-05-14 14:18:36 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-05-14 18:17:08 -0700 |
commit | 67662fe0714cbcc89d732d4a04df975b0de2ca36 (patch) | |
tree | 1512fce55378e94e49aea20e441891fc179940db | |
parent | 65d5e99ee231624c66a26b70296a659d551c0266 (diff) | |
download | rainbows-67662fe0714cbcc89d732d4a04df975b0de2ca36.tar.gz |
-rw-r--r-- | GNUmakefile | 4 | ||||
-rw-r--r-- | Rakefile | 18 |
2 files changed, 18 insertions, 4 deletions
diff --git a/GNUmakefile b/GNUmakefile index be93932..24726ae 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -17,8 +17,8 @@ ifeq ($(RUBY_VERSION),) endif # rake takes forever to start -isolate: tmp/gems/$(RUBY_VERSION)/.isolate -tmp/gems/$(RUBY_VERSION)/.isolate: $(ISOLATE_CONFIG) +isolate: tmp/isolate/ruby-$(RUBY_VERSION)/.isolate +tmp/isolate/ruby-$(RUBY_VERSION)/.isolate: $(ISOLATE_CONFIG) ISOLATE_CONFIG=$(ISOLATE_CONFIG) $(RAKE) isolate > $@ @@ -187,6 +187,20 @@ end desc 'isolate gems for development' task :isolate do require 'isolate' - Isolate.gems "tmp/gems/#{RUBY_VERSION}", - :file => ENV['ISOLATE_CONFIG'] + require 'rbconfig' + + Isolate.now! :file => ENV['ISOLATE_CONFIG'], :system => false + + # for Ruby 1.8 isolate uses "1.8" instead of "1.8.7" for paths, + # but we'll still try to support 1.8.6 for now even though isolate + # does not. + if Gem.ruby_engine == "ruby" && + RbConfig::CONFIG["ruby_version"] != RUBY_VERSION + require 'fileutils' + Dir.chdir('tmp/isolate') do + FileUtils.rm_rf("ruby-#{RUBY_VERSION}") + File.symlink "ruby-#{RbConfig::CONFIG["ruby_version"]}", + "ruby-#{RUBY_VERSION}" + end + end end |