aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/ext
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-22 22:46:50 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-22 22:46:50 +0000
commit4c2304f0004e9f1784540f3d36976aad9eab1f68 (patch)
treefe5d7f52b7e01644d0a57316aab03299ed0ee5c8 /lib/rubygems/ext
parent66cc0fa4abde68ae360ba2d2cdf4e44bc833e33a (diff)
downloadruby-4c2304f0004e9f1784540f3d36976aad9eab1f68.tar.gz
* lib/rubygems: Import RubyGems from master as of commit b165260
* test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/ext')
-rw-r--r--lib/rubygems/ext/builder.rb4
-rw-r--r--lib/rubygems/ext/ext_conf_builder.rb7
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb
index 74689bb5e2..ee390578ae 100644
--- a/lib/rubygems/ext/builder.rb
+++ b/lib/rubygems/ext/builder.rb
@@ -23,11 +23,13 @@ class Gem::Ext::Builder
make_program = (/mswin/ =~ RUBY_PLATFORM) ? 'nmake' : 'make'
end
+ destdir = '"DESTDIR=%s"' % ENV['DESTDIR'] if RUBY_VERSION > '2.0'
+
['', 'install'].each do |target|
# Pass DESTDIR via command line to override what's in MAKEFLAGS
cmd = [
make_program,
- '"DESTDIR=%s"' % ENV['DESTDIR'],
+ destdir,
target
].join(' ').rstrip
run(cmd, results, "make #{target}".rstrip)
diff --git a/lib/rubygems/ext/ext_conf_builder.rb b/lib/rubygems/ext/ext_conf_builder.rb
index f53661c733..5112eb8e2f 100644
--- a/lib/rubygems/ext/ext_conf_builder.rb
+++ b/lib/rubygems/ext/ext_conf_builder.rb
@@ -39,6 +39,7 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
run cmd, results
ENV["DESTDIR"] = nil
+ ENV["RUBYOPT"] = rubyopt
siteconf.unlink
make dest_path, results
@@ -49,14 +50,14 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
destent.exist? or File.rename(ent.path, destent.path)
end
end
-
- results
ensure
ENV["RUBYOPT"] = rubyopt
ENV["DESTDIR"] = destdir
end
end
- t.unlink if t
+ t.unlink if t and t.path
+
+ results
ensure
FileUtils.rm_rf tmp_dest if tmp_dest
end