diff options
author | ryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-28 23:46:47 +0000 |
---|---|---|
committer | ryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-28 23:46:47 +0000 |
commit | 934f537b458778f4786716c95b73fc72bc1ce256 (patch) | |
tree | 6abdecd9956995a7f82c9f969c80657b4301f6bd /lib/rubygems/ext | |
parent | b511e1bfbe649b938e317e00ad1795f1b9623758 (diff) | |
download | ruby-934f537b458778f4786716c95b73fc72bc1ce256.tar.gz |
Import rubygems 1.5.0 (release candidate @ 09893d9)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/ext')
-rw-r--r-- | lib/rubygems/ext/builder.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/ext/rake_builder.rb | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb index 89242aff08..29d5af5b12 100644 --- a/lib/rubygems/ext/builder.rb +++ b/lib/rubygems/ext/builder.rb @@ -28,7 +28,7 @@ class Gem::Ext::Builder File.open('Makefile', 'wb') {|f| f.print mf} - # try to find make program from Ruby configue arguments first + # try to find make program from Ruby configure arguments first RbConfig::CONFIG['configure_args'] =~ /with-make-prog\=(\w+)/ make_program = $1 || ENV['make'] unless make_program then diff --git a/lib/rubygems/ext/rake_builder.rb b/lib/rubygems/ext/rake_builder.rb index d3b5cba75c..ba9fa8a94c 100644 --- a/lib/rubygems/ext/rake_builder.rb +++ b/lib/rubygems/ext/rake_builder.rb @@ -25,8 +25,16 @@ class Gem::Ext::RakeBuilder < Gem::Ext::Builder # Deal with possible spaces in the path, e.g. C:/Program Files dest_path = '"' + dest_path + '"' if dest_path.include?(' ') - cmd = ENV['rake'] || "\"#{Gem.ruby}\" -rubygems #{Gem.bin_path('rake')}" rescue Gem.default_exec_format % 'rake' - cmd += " RUBYARCHDIR=#{dest_path} RUBYLIBDIR=#{dest_path}" # ENV is frozen + rake = ENV['rake'] + + rake ||= begin + "\"#{Gem.ruby}\" -rubygems #{Gem.bin_path('rake')}" + rescue Gem::Exception + end + + rake ||= Gem.default_exec_format % 'rake' + + cmd = "#{rake} RUBYARCHDIR=#{dest_path} RUBYLIBDIR=#{dest_path}" # ENV is frozen run cmd, results |